HTML5 Semantic Elements Cheat Sheet
Covers HTML5 semantic tags like header, nav, main, article, and section, plus their implicit accessibility roles.
1 PageBeginnerFeb 25, 2026
Semantic Page Layout
A typical page skeleton built from semantic elements.
html
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Page Title</title></head><body> <header> <nav> <a href="/">Home</a> <a href="/about">About</a> </nav> </header> <main> <article> <h1>Article Title</h1> <section> <h2>Section Heading</h2> <p>Content...</p> </section> <aside>Related links</aside> </article> </main> <footer> <p>© 2026 Company</p> </footer></body></html>
Accessible Semantics
Implicit roles and native interactive elements.
html
<!-- Native elements already expose implicit ARIA roles --><nav aria-label="Breadcrumb">...</nav> <!-- role="navigation" --><main>...</main> <!-- role="main" --><!-- details/summary as a native accordion --><details> <summary>Click to expand</summary> <p>Hidden content revealed on toggle.</p></details><!-- Prefer <button> over a styled <div> for interactive controls --><button type="button" aria-pressed="false">Toggle</button>
Pro Tip
Semantic elements come with implicit ARIA roles built in, such as nav mapping to role navigation and main mapping to role main, so reaching for explicit role attributes on a div should be your last resort, not your default.
Was this cheat sheet helpful?
Explore Topics
#HTML5SemanticElements#HTML5SemanticElementsCheatSheet#WebDevelopment#Beginner#SemanticPageLayout#SemanticElements#AccessibleSemantics#Covers#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech
Professional Web Designing Services
- Responsive Websites
- E-commerce Solutions
- SEO Friendly Design
- Fast & Secure
- Support & Maintenance