Master the building blocks of the web! HTML is your gateway to creating amazing websites and understanding how the internet works.
HTML stands for HyperText Markup Language. Think of it as the skeleton of every website you visit! Just like how your body has bones to give it structure, every webpage has HTML to give it structure.
HTML uses special codes called "tags" to tell the web browser how to display content. These tags are like instructions that say "this is a heading," "this is a paragraph," or "this is a link."
HTML was invented in 1993 by Tim Berners-Lee, and it's the reason we can have websites today! Every single website you've ever visited uses HTML, including YouTube, Google, and Instagram!
HTML tags are like containers that hold your content. They usually come in pairs - an opening tag and a closing tag:
<h1>This is a heading</h1>
<p>This is a paragraph</p>
Every HTML page has the same basic structure. It's like a template that every website follows:
<!-- This tells the browser it's an HTML document -->
<!DOCTYPE html>
<html>
<head>
<title>My First Website</title>
</head>
<body>
<h1>Welcome to my website!</h1>
<p>This is my very first webpage.</p>
</body>
</html>
Here are the most important HTML tags you'll use all the time:
Use h1 to h6 for different sized headings:
<h1>Biggest heading</h1>
<h2>Second biggest</h2>
<h3>Third biggest</h3>
Use <p> tags for regular text:
<p>This is a paragraph of text. It can be as long or as short as you want!</p>
Use <a> tags to create links:
<a href="https://www.google.com">Visit Google</a>
Use <img> tags to add pictures:
<img src="cat.jpg" alt="A cute cat">
Always use the "alt" attribute in your img tags. It helps people who can't see the image understand what it shows, and it's also good for search engines!
Here's a live example of HTML code and what it looks like in a web browser:
<h1>Welcome to My Blog</h1>
<h2>My First Post</h2>
<p>Today I learned HTML! It's really fun and easy to learn.</p>
<p>Here are some things I can do with HTML:</p>
<ul>
<li>Create headings</li>
<li>Write paragraphs</li>
<li>Add links and images</li>
</ul>
<p>Visit <a href="#">my portfolio</a> to see more!</p>
Today I learned HTML! It's really fun and easy to learn.
Here are some things I can do with HTML:
Visit my portfolio to see more!
You can create two types of lists in HTML:
<!-- Unordered List (bullet points) -->
<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Oranges</li>
</ul>
<!-- Ordered List (numbered) -->
<ol>
<li>First step</li>
<li>Second step</li>
<li>Third step</li>
</ol>
Make your text stand out with these formatting tags:
<strong>This text is bold</strong>
<em>This text is italic</em>
<u>This text is underlined</u>
Sometimes you need to organize your content:
<p>This is line one.<br>This is line two.</p>
<div>
<p>This paragraph is inside a div container.</p>
</div>
The best way to learn HTML is by doing! Try creating your own HTML page using the tags you've learned.
Start Coding NowCongratulations! You've learned the basics of HTML. Here's what you can learn next:
Learn how to make your websites beautiful with colors, fonts, and layouts using CSS!
Add interactivity to your websites! Make buttons work, create animations, and build games.
Make your websites look great on phones, tablets, and computers of all sizes.
Start building real websites! Create a portfolio, blog, or even a simple online store.
HTML is just the beginning of your web development journey. Once you master HTML, CSS and JavaScript will help you create amazing, interactive websites that people will love to visit!
Here's a handy reference of all the HTML tags we covered today:
<html> - Main container
<head> - Page information
<body> - Visible content
<title> - Page title
<h1> to <h6> - Headings
<p> - Paragraphs
<strong> - Bold text
<em> - Italic text
<a href=""> - Links
<img src=""> - Images
<br> - Line break
<div> - Container
<ul> - Unordered list
<ol> - Ordered list
<li> - List item
You've taken your first big step into web development! HTML is the foundation of everything on the web, and now you know how to use it.
Remember: every expert was once a beginner. Keep practicing, stay curious, and don't be afraid to experiment with your code. The web development world is full of amazing possibilities!