The HTML article element marks a self-contained composition that can stand independently, such as a blog post. Semantic markup chooses elements for meaning rather than visual appearance, supporting clearer structure, accessibility, and SEO. section 2.1
React interview scenario
For a favorite-article component, place the title and subtitle in a header, wrap the article sections in section elements, and place the composition inside main. Explain why each element describes the content rather than merely styling it. section 2.1
Listing 2.2 The BlogPost <main> element defined using semantic elements
<main>
<article>
<header>
<h1>{post.title}</h1>
<h2>{post.subtitle}</h2>
</header>
{post.sections.map((section, index) => (
<section key="{index}">
<h3>{section.title}</h3>
{section.subsections.map((subsection, subIndex) => (
<div key="{subIndex}">
<h4>{subsection.title}</h4>
<p>{subsection.content}</p>
</div>
))}
</section>
))}
</article>
</main>
Inspect a JSX implementation that nests article, header, main, section, headings, and paragraphs for a structured blog post. section 2.1

