HTML Blog Page Project

HTML Project: Blog Page

Whether you’re writing about apples, AI, or adventures in coding, a blog page gives your voice a home. In this project, we’ll build a semantic, clean, and SEO-ready blog page using just HTML — perfectly suited for beginners.

1. Base Structure and Meta Setup

Let’s start with a standard HTML boilerplate that includes semantic markup and essential metadata.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>FruitBlog - Simple Posts About Sweet Things</title>
  <meta name="description" content="A beginner HTML blog layout with posts about apples, bananas, cherries, and more.">
</head>
<body>
  <header>...</header>
  <main>...</main>
  <footer>...</footer>
</body>
</html>

2. Navigation Menu

Use a semantic <nav> block inside your header to guide users to key sections of your site.

<header>
  <h1>FruitBlog</h1>
  <nav>
    <a href="/">Home</a>
    <a href="#about">About</a>
    <a href="#posts">Blog Posts</a>
    <a href="#contact">Contact</a>
  </nav>
</header>

3. Article Sections (Main Blog Layout)

Each blog post should live in its own <article> element. This improves structure and accessibility.

<main id="posts">
  <article>
    <h2>The Best Apple for Baking?</h2>
    <p>Posted on <time datetime="2024-08-12">August 12, 2024</time> by Jane Doe</p>
    <img src="apple-thumb.jpg" alt="A fresh green apple" width="300">
    <p>When it comes to baking, Granny Smith apples are a tart favorite...</p>
    <a href="/posts/apple-baking.html">Read more</a>
  </article>
</main>
[ Clean structure allows each blog post to be independently styled and indexed ]

4. Author Details (Optional Sidebar or Below Article)

<section class="author-box">
  <h3>About the Author</h3>
  <img src="jane.jpg" alt="Jane Doe portrait" width="100">
  <p>Jane writes about seasonal fruits, baking tips, and digital storytelling. She loves cherries.</p>
</section>

5. Responsive Layout Tips

While we’re not using CSS here, your HTML structure should prepare for responsiveness:

  • Wrap articles in a <main> block
  • Use <section> or <aside> for sidebars
  • Group navigation inside <nav> and limit nesting
  • Add alt attributes to all images for accessibility and fallback

6. Multiple Posts Example

<article>
  <h2>Banana Bread Secrets</h2>
  <p>Posted on <time datetime="2024-08-05">August 5, 2024</time> by John Smith</p>
  <img src="banana-thumb.jpg" alt="Sliced banana bread" width="300">
  <p>Banana bread is best with overripe bananas — the browner, the better...</p>
  <a href="/posts/banana-bread.html">Read more</a>
</article>

<article>
  <h2>Why Cherries Are a Summer Superfood</h2>
  <p>Posted on <time datetime="2024-07-30">July 30, 2024</time> by Jane Doe</p>
  <img src="cherry-thumb.jpg" alt="Cherries in a bowl" width="300">
  <p>Rich in antioxidants and flavor, cherries pack a powerful punch...</p>
  <a href="/posts/cherry-superfood.html">Read more</a>
</article>

8. Summary

By completing this blog page, you’ve practiced:

  • Using <article> and <section> tags semantically
  • Organizing blog posts with thumbnails and dates
  • Structuring navigation for usability and SEO
  • Preparing for responsive layouts using clean HTML

Check your understanding 1

Which HTML tag is best suited to wrap each individual blog article section for semantic clarity?
Choose one answer. You can try again.

Answer and explanation

<article>

The <article> element represents a self-contained piece of content such as a blog post or news article.

Check your understanding 2

Including author information within an <aside> tag helps screen readers and search engines understand its complementary nature.
Choose one answer. You can try again.

Answer and explanation

True

The <aside> element is intended for content related to the main content but not central to it, like author bio or related links.

Check your understanding 3

Choose the option that lists all and only the correct statements.

  1. Using with descriptive alt text
  2. Optimizing image size for fast loading
  3. Using CSS to resize large images without optimization
  4. Including captions where relevant
Which of the following are important considerations when using image thumbnails on a blog page?
Choose one answer. You can try again.

Answer and explanation

Statements 1 and 2 and 4

Descriptive alt text improves accessibility, optimized image sizes improve performance, and captions can provide additional context.

Check your understanding 4

What is the main benefit of a responsive layout on a blog page?
Choose one answer. You can try again.

Answer and explanation

Content adapts smoothly across devices of different sizes

Responsive layouts ensure the site looks and works well on desktops, tablets, and mobile phones by adapting content dynamically.

Check your understanding 5

A navigation menu should use semantic elements like <nav> and organized lists to enhance accessibility and SEO.
Choose one answer. You can try again.

Answer and explanation

True

The <nav> element indicates navigation sections and using <ul>/<li> for menu items helps structure navigation clearly.

Check your understanding 6

Choose the option that lists all and only the correct statements.

  1. Sticky navigation bar for easy access
  2. Clear and concise anchor text
  3. Using inline styles for menu appearance
  4. Providing a search feature within the menu
Which of the following practices improve a blog’s navigation usability?
Choose one answer. You can try again.

Answer and explanation

Statements 1 and 2 and 4

Sticky nav bars, clear links, and search improve usability. Inline styles reduce maintainability and are not a best practice.

What’s Next?

Next, we’ll apply CSS styling to this blog layout to enhance typography, spacing, and responsiveness. Ready to bring your blog to life?

Reaching the recap and completing the quizzes are separate milestones.

    Course overview →