What is semantic HTML?

DefinitionSemantic HTML is the practice of using HTML elements that describe the meaning and structure of content, such as headings, lists, navigation and articles, rather than generic elements chosen only for how they look.

Also known as Semantic markup

In semantic markup, a button is a button element, the main content of a page sits in a main element, navigation links sit in a nav element, and headings follow a logical h1 to h6 outline. Generic div and span elements carry no meaning on their own, so they are best kept for layout and styling hooks. CSS then controls how everything looks, which keeps presentation separate from meaning.

Semantic HTML matters because browsers, screen readers, search engines and AI agents read the markup, not the visual design. The right elements give assistive technology built-in roles and keyboard behavior, help search engines understand what a page is about and make content easier to extract for features such as featured snippets. It is also easier to maintain than markup that depends on ARIA attributes or scripts to patch in missing meaning.

Semantic HTML resources

Common questions about Semantic HTML

What's the difference between article and section in semantic HTML?

Use article for a self-contained piece of content that would make sense on its own, such as a blog post, news story or comment. Use section to group related content within a page or article under a shared theme, usually with its own heading, and use a plain div when the grouping is only for styling.

Does semantic HTML allow more than one h1 per page?

HTML allows several h1 elements, but browsers and screen readers never adopted the outline algorithm that would have ranked them by section, and it was removed from the HTML standard in 2022. Using one h1 for the page's main topic and h2 to h6 for its subsections gives the clearest outline.

Should I use strong or b in semantic HTML?

Use strong when text is important, serious or urgent, and b only to make text stand out without adding importance, such as keywords or product names. The same split applies to em, which adds stress emphasis, and i, which marks things like technical terms or words from another language.

Do I still need ARIA when using semantic HTML?

Often not. Native elements such as button, nav and main come with built-in roles, states and keyboard support, so the first rule of ARIA is to use them instead of adding ARIA to generic elements. ARIA is still useful for custom widgets, such as tabs or comboboxes, that HTML has no native element for.

Topic: Web development

Cite this definition
APA

What is semantic HTML? (2026, November 22). Glossary. https://glossary.io/semantic-html/

MLA

“What Is Semantic HTML?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/semantic-html/.

Chicago

“What Is Semantic HTML?” Glossary. Coywolf. November 22, 2026. https://glossary.io/semantic-html/.

HTML link
<a href="https://glossary.io/semantic-html/">What is semantic HTML?</a>

Published · Updated