Summary - Semantic blog skeleton
Build a blog page skeleton using all semantic elements.
What we learned in this group
In this group you met the core semantic tags:
<header>and<footer>: top and bottom<nav>and<main>: menu and main content<article>and<section>: self-contained post and themed part<aside>and<address>: side content and contact
Now we will combine them into a blog page skeleton.
Exercise Write a blog skeleton
Build this shape inside body: a <header> holding an <h1> (text: My Diary); a <nav> holding a <ul> with one <li> (text: Home); a <main> holding an <article> with an <h2> (text: First post) and a <p>; an <aside> holding an <h2> (text: Related); a <footer> holding a <p> (text: © 2024).
Show example solution
<body>
<header>
<h1>My Diary</h1>
</header>
<nav>
<ul>
<li>Home</li>
</ul>
</nav>
<main>
<article>
<h2>First post</h2>
<p>Post text...</p>
</article>
</main>
<aside>
<h2>Related</h2>
</aside>
<footer>
<p>© 2024</p>
</footer>
</body>
Test yourself
-
Match each tag to its role
- <header>
- Top of a section
- <nav>
- Main menu
- <main>
- Main content
- <article>
- Self-contained post
- <aside>
- Side content
-
Contact inside the footer
<footer> <____> <a href="mailto:info@blog.org">Contact</a> </address> </footer>Show answer
<footer> <address> <a href="mailto:info@blog.org">Contact</a> </address> </footer> -
Which tag marks the main content of a blog page?
- <aside>
- <main>
- <address>
- <nav>
Show answer
<main> — Correct. main marks the page's main content.