Skip to content
Citable

Definition

Semantic HTML

Semantic HTML is markup that uses elements for what content is rather than how it should look: article, section, nav, h1–h6, dl, table, time, blockquote and cite, instead of generic div and span. Because crawlers and text extractors read structure rather than styling, semantic markup determines how a page is split into passages and which parts survive extraction.

The sectioning and heading elements are defined in the WHATWG HTML Living Standard. MDN's glossary entry on semantics states the principle plainly: write HTML to represent the data, not its default presentation.

Answer engine pipelines typically convert a page to plain text or Markdown before chunking it, and that conversion is only as good as the markup. Headings become section boundaries, <p> becomes a paragraph, <table> becomes a table, <dl> becomes term and definition pairs. A page built from nested <div> elements with visual class names converts into one undifferentiated block, and the answer-first passage at the top merges with the navigation around it.

The rules that matter most for extraction:

  • one <h1>, and a heading outline that does not skip levels
  • <main> around the content; <nav>, <header>, <footer> and <aside> around everything that is not the content
  • <time datetime="…"> on published and updated dates
  • real <ul>, <ol>, <table> and <dl> elements for list-like, tabular and definitional data
html
<article>
  <h1>What is content negotiation?</h1>
  <p data-speakable="short-answer">Content negotiation is the HTTP mechanism…</p>
  <p>Published <time datetime="2026-01-12">12 January 2026</time></p>
  <h2>How it works</h2>
  <dl>
    <dt>Accept</dt>
    <dd>The media types the client prefers, in order.</dd>
  </dl>
</article>

A page marked up this way converts cleanly into the Markdown that this site serves to crawlers.

Frequently asked questions

Is semantic HTML the same as structured data?

No. Semantic HTML describes the role of content within the page — this is an article, this is its heading, this is a definition list. Structured data (JSON-LD using schema.org types) describes the things the page is about — a person, an organisation, a defined term — in a vocabulary machines share across sites. Good pages use both, generated from the same source.

Guides that use this term

  • Technical

    Serving Markdown to LLMs: content negotiation and .md endpoints

    Serving Markdown to LLMs means publishing a plain-text representation of each page next to the HTML one, so that AI crawlers and agents can read it without rendering JavaScript or spending tokens on markup. There are two delivery patterns: a .md suffix on the canonical URL, and content negotiation on the Accept: text/markdown request header, with Vary: Accept and a Link rel=canonical header pointing back to the HTML page.

    10 min read

  • Content

    How to write answer-first content that LLMs can quote

    Answer-first content opens every page and every section with a self-contained answer of roughly 40–70 words, then explains, qualifies and expands. The first sentence names the main entity, each heading carries exactly one question, and no passage depends on a pronoun or a paragraph elsewhere. Written this way, a passage still makes sense after an answer engine splits the page into chunks and retrieves one of them in isolation.

    8 min read