Hey there!
Ready to level up your HTML skills? Now that you’ve got the basics down, let’s learn how to structure your web page using headings and paragraphs. These two simple tools will help you organize your content so it looks clean, readable, and professional.
What are Headings in HTML?
Headings are like titles or subtitles. They help readers (and search engines!) understand the structure of your content. HTML gives you six types of headings, from <h1>
to <h6>
:
<h1>
is the biggest, boldest heading (think: main title).<h6>
is the smallest (think: a tiny footnote).
Try It in the Editor
HTML Headings:
<h1>This is Heading 1</h1>
<h2>This is Heading 2</h2>
<h3>This is Heading 3</h3>
<h4>This is Heading 4</h4>
<h5>This is Heading 5</h5>
<h6>This is Heading 6</h6>
- Click the Try it Yourself button below to see how headings look in the code editor:
Why Use Headings?
Headings aren’t just for looks. They:
- Organize your content: Make it easy for readers to follow.
- Help with SEO: Search engines use headings to understand your page’s structure.
- Make text scannable: Readers can quickly find the info they need.
What are Paragraphs in HTML?
Paragraphs are for regular text. Use the <p>
tag to create them. Think of paragraphs like the sentences in an article or story.
Example:
HTML Paragraphs:
<p>This is a paragraph. You can write anything here, from introductions to detailed explanations.</p>
<p>Here’s another paragraph. HTML makes it easy to add lots of text to your page.</p
- Want to see it in action? Click the Try it Yourself button below and start experimenting:
Headings + Paragraphs: Let’s Combine Them!
Here’s how you can use headings and paragraphs together to create a clean, organized web page:
Example:
HTML Headings and Paragraphs:
<h1>Welcome to My Blog</h1>
<p>Hi! My name is [Your Name], and I’m learning HTML. It’s super exciting to build my own web pages!</p>
<h2>About Me</h2>
<p>I love coding, reading books, and playing video games. HTML is my first step into web development.</p>
<h2>What I’m Learning</h2>
<p>Right now, I’m learning how to use headings and paragraphs to structure my content. It’s fun and easy!</p>
- Try this in the HTML Editor and see how headings create sections while paragraphs add the details.
Pro Tips for Using Headings and Paragraphs
- Use one
<h1>
per page. It’s like the title of a book — you only need one. - Use
<h2>
for major sections and<h3>
for subsections. - Keep your paragraphs short and sweet. It’s easier for readers to follow.
- Don’t forget to indent your code for better readability. Like this:
Pro Tips for Heading and Paragraphs:
<h1>Main Title</h1>
<p>This is a paragraph.</p>
Practice Time!
Here’s a quick challenge for you:
Here’s a challenge for you:
- Create a page with:
- A
<h1>
heading that says “Welcome to My Portfolio.” - A
<h2>
section called “About Me.” - Two paragraphs introducing yourself and your favorite hobby.
- A
- Use the Try it Yourself editor to build and test your code.
Need a hint? Here’s a starter template:
HTML Practice:
<h1>Welcome to My Website</h1>
<h2>About Me</h2>
<p>Hi, I’m [Your Name], and I’m learning HTML. It’s so much fun to build web pages!</p>
<p>I enjoy coding, painting, and exploring new technologies. What about you?</p>
Why This Matters
Headings and paragraphs make your content readable and organized. They’re the most common tags you’ll use in HTML, so getting comfortable with them is key.
What’s Next?
Next up, we’ll spice up your web pages by adding links and images. Imagine making your text clickable or displaying cool visuals on your page. Stay tuned — it’s going to be fun!