liveBook · Manning

Article element

As explained in Acing the Frontend Interview

The HTML article element represents a self-contained composition that can stand independently, such as a blog post.

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

How Acing the Frontend Interview covers it

How deep it goes
Defines article and demonstrates its JSX placement, but does not descend into browser or accessibility implementation internals.
Examples
Uses a favorite-article React component containing a title, subtitle, sections, subsections, headings, paragraphs, and copyright footer.
What it assumes
Assumes HTML and JSX familiarity while clarifying semantic HTML through element meaning, purpose, and typical use cases.
What you can do after
Apply it via JSX to structure self-contained article content and justify semantic choices during frontend interviews.
How it connects
Connects article with semantic HTML, accessibility, SEO, JSX, main, header, section, footer, and heading elements.

Also explained in

Compare how 2 books explain article element →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Frontend Interview. The section links point to the parts of the book it draws on.