HTML & Semantics6 min readUpdated 2026-11-15

Accessible Semantic HTML: Building on Native Elements

Semantic HTML gives you roles, states, and keyboard behaviors for free. Learn how to avoid div-soup anti-patterns.

Key Takeaways

  • Use <button> for actions and <a href> for navigation.
  • Wrap page sections in landmarks (<header>, <nav>, <main>, <footer>).
  • Always set <html lang='...'> and a descriptive <title>.

Native Buttons vs. Clickable Divs

A native <button> participates in Tab order, fires on both Enter and Space, supports disabled states, and announces as 'button'. Rebuilding all of that on a <div> takes dozens of lines of fragile ARIA and JavaScript.

Use native interactive tags

Avoid
<div class="btn" onclick="save()">Save</div>
Recommended Pattern
<button type="button" onclick="save()">Save</button>

Frequently Asked Questions

Yes! CSS resets like background: transparent; border: none; let a native <button> match any visual design while keeping full accessibility.

Interactive Tools for This Guide

HTML Structure

HTML Accessibility Checker

Comprehensive local HTML audit with DOM structural checks, optional axe-core scan, and before/after preview.

Open tool
HTML Structure

Semantic HTML Checker

Spot clickable <div> elements, missing landmarks, and non-semantic markup patterns.

Open tool

Continue Reading