HTML5 Semantic Tags Cheatsheet

Complete HTML5 semantic elements: structure, content, media, and interactive components.

TagDescriptionUsageExampleCategory
<header>Header section of page or sectionContains logo, navigation, titles<header><h1>Website Title</h1></header>Structure
<nav>Navigation links containerPrimary and secondary navigation<nav><a href="/">Home</a></nav>Structure
<main>Main content of the pageUnique content, excludes sidebars<main><article>...</article></main>Structure
<article>Independent content pieceBlog posts, news items, comments<article><h2>Post Title</h2><p>Content</p></article>Content
<section>Thematic groupingChapter, tabbed content, headings<section><h2>Section Title</h2></section>Content
<aside>Sidebar/tangential contentSidebars, related links, advertisements<aside><h3>Related</h3></aside>Structure
<footer>Footer sectionCopyright, links, contact info<footer><p>&copy; 2024</p></footer>Structure
<figure>Self-contained illustrationImages, diagrams, code samples<figure><img src="img.jpg" /><figcaption>Caption</figcaption></figure>Media
<figcaption>Caption for figureDescribe figure element<figcaption>Image description here</figcaption>Media
<details>Collapsible details widgetHidden content, accordion<details><summary>Click to expand</summary>Content</details>Interactive
<summary>Summary for details elementClickable title for details<summary>Summary text</summary>Interactive
<time>Date or timePublish dates, schedules<time datetime="2024-01-01">January 1, 2024</time>Content
<mark>Highlighted/marked textSearch results, highlighting<p>This is <mark>important</mark></p>Content
<progress>Progress barTask completion, file uploads<progress value="70" max="100"></progress>Interactive