Mark up a blog post so that it makes sense on its own.
What to build
An article in main, with two sections and a publication date.
Requirements
- A
maincontaining onearticle. - The
articlestarts with anh1readingWhy I walk to work. - A
timewithdatetime="2030-05-01"shows1 May. - Two
sectionelements in the article, each with anh2:HealthandMoney. - An
asideinsidemain, but outside the article, with any text.
Constraints
Each section must have a heading.
Example
<time datetime="2030-05-01">1 May</time>
Why it works
The article can stand alone, the sections divide it by theme, and the aside is clearly secondary.
Hints
Hint 1
The whole post is an article. Each part of it with a heading is a section.
Hint 2
The time element needs a datetime attribute.
Solution
Show one correct solution (try it yourself first)
<main>
<article>
<h1>Why I walk to work</h1>
<p>Published <time datetime="2030-05-01">1 May</time></p>
<section>
<h2>Health</h2>
<p>Thirty minutes a day adds up.</p>
</section>
<section>
<h2>Money</h2>
<p>The bus fare goes in a jar.</p>
</section>
</article>
<aside><p>More from this author</p></aside>
</main>