Skip to main content
Perceivly: Perceivly home

Semantic HTML

Also called: HTML semantics, Native HTML elements

Using HTML elements for what they mean (button, nav, h2, label) so the browser exposes the right role and behavior to everyone.

Definition

The HTML standard says that elements, attributes and attribute values in HTML are defined to have certain meanings (semantics). A <button> is a button, an <h2> is a second-level heading, a <ul> is a list. Semantic HTML means choosing elements by that meaning, not by how they look.

Browsers turn those meanings into roles in the accessibility tree and add built-in behavior: a <button> is focusable and responds to Enter and Space with no extra code.

Why it matters

A large share of common WCAG failures come from generic elements standing in for real ones: a clickable div that a keyboard cannot reach (2.1.1 Keyboard), bold text pretending to be a heading or a table built from divs (1.3.1 Info and Relationships), or a control with no role (4.1.2). Native elements avoid these by default and need less ARIA.

How to test or meet it

  • Use <button> for actions and <a href> for navigation.
  • Mark up headings with h1 to h6 in order, lists with ul/ol, and data tables with th and scope.
  • Use landmark elements for page regions and <label> for fields.

Automated tools catch some symptoms, such as list items outside a list or an empty heading. Whether bold text should be a heading, or a div should be a button, needs a person: compare what you see with the markup, or use our heading checker to review the outline.

WCAG criteria

Tools and guides

Sources

  1. HTML Living Standard: semantics (WHATWG)
  2. Understanding 1.3.1 Info and Relationships (W3C)

By the Perceivly team · Published . This explains a term; it is not legal advice.

Check a page for free

The free accessibility checker tests one page against WCAG 2.2 A and AA in about 10 seconds and lists what still needs a manual review. No sign-up.

All glossary terms