Skip to content
Hot takeWeb

HTML Is Boring — And That's Exactly Why You Need to Master It

HTML defines the structure and meaning of content on the web. It's boring because it's simple—but that simplicity is where the power lives. Master semantic HTML and you'll write…

By Nitish Dhir · · 7 min read

TL;DR

HTML defines the structure and meaning of content on the web. It’s boring because it’s simple—but that simplicity is where the power lives. Master semantic HTML and you’ll write accessible, SEO-friendly, maintainable code. Skip it and you’ll spend years fighting layout problems that wouldn’t exist if you’d structured your markup right.

I once worked with a developer who built an entire form using divs. No fieldsets. No labels. No semantic input elements. Just divs with click handlers.

It worked. Sort of. Until a client used a screen reader and reported nothing was usable. Until we added validation and realized there were no semantic input fields to attach error messages to. Until we tried to add keyboard support and realized we’d recreated the wheel poorly.

That’s when I learned: HTML isn’t boring because it doesn’t matter. HTML is boring because people don’t respect it. And that disrespect is expensive.

What HTML Actually Is (And Why It Matters)

HTML is not a styling language. It’s not a layout language. It’s not a programming language. HTML is a semantic markup language. It describes what content IS, not how it looks.

A paragraph is a `

`. A heading is an `

` through `

When you use `

`, the browser knows it’s a paragraph and treats it accordingly. Screen readers announce it as a paragraph. Search engines understand paragraph context. CSS can style it appropriately. It’s semantic.

When you use `

` and apply `cursor: pointer` and `onclick`, you’ve created something that looks like a button but isn’t one. The browser doesn’t know it’s clickable. Screen readers don’t know it’s interactive. Search engines don’t understand it. You’ve created confusion.

This is what people miss about HTML: it’s not about how it looks. It’s about what it means. And meaning matters for accessibility, SEO, and maintenance.

The Semantic HTML Fundamentals You’re Missing

Most developers know about `

`, ``, and `

`. That covers about 20% of HTML. The rest is where the real utility lives.

Headings: `

` through `

` aren’t just for styling. They create document structure. Screen readers use heading hierarchy to navigate. Search engines use headings to understand what your page is about. You should have exactly one `

` per page. Then nested `

`, `

`, etc., based on content hierarchy—not on how big you want text to be.

Lists: `

` and `

` with `

  1. ` aren’t just for bulleted lists. They semantically describe grouped content. A navigation menu is a list. A set of options is a list. Use the semantic element, not divs with styling.

    Sectioning: `

    `, `

    `, `

    `, `

    `, `

    `, `

    `. These describe the role of content. A blog post is an `

    `. Navigation is a `

    `. These aren’t just semantic; they help screen readers and other assistive tech understand document structure.

    Forms: `

    `, `

    `, `

    `, ``, ``, ``, `<select>`. These work together to create accessible, functional forms. A `<label>` associated with an `<input>` via the `for` attribute makes the label clickable and associates it for screen readers. This is free accessibility, but you have to use the semantic elements.</p> <p><strong>Emphasis and strong:</strong> `<em>` and `<strong>` have semantic meaning. `<em>` indicates emphasized content (usually read as italics). `<strong>` indicates strongly emphasized content (usually bold). Using `<i>` and `<b>` for styling is wrong—they’re presentation, not meaning. Use CSS for styling. Use semantic elements for meaning.</p> <p>The pattern is consistent: HTML has elements designed for specific semantic purposes. Using the right element isn’t optional. It’s how you communicate meaning to the browser and its users.</p> <h2>Semantic HTML in Real Code (Actually Useful Examples)</h2> <p>Let’s say you’re building a navigation menu. Bad version:</p> <pre><code><div class="navbar"> <div class="nav-item" onclick="goto('/home')">Home</div> <div class="nav-item" onclick="goto('/about')">About</div> <div class="nav-item" onclick="goto('/contact')">Contact</div> </div></code></pre> <p>Better version:</p> <pre><code><nav> <ul> <li><a href="/">Home</a></li> <li><a href="/about">About</a></li> <li><a href="/contact">Contact</a></li> </ul> </nav></code></pre> <p>The second version is shorter. It’s accessible by default. It works without JavaScript. Screen readers understand it. Search engines understand it. It’s keyboard navigable by default. You get all of this for free by using semantic HTML.</p> <p>Here’s a form example. Bad:</p> <pre><code><div class="form-field"> <div class="label">Email</div> <input type="text" name="user_email" /> <div class="error" id="email-error"></div> </div></code></pre> <p>Better:</p> <pre><code><form> <fieldset> <label for="user-email">Email</label> <input id="user-email" type="email" name="email" required /> <span role="alert" aria-live="polite" id="email-error"></span> </fieldset> </form></code></pre> <p>The second version associates the label with the input. The label is clickable. Screen readers announce it correctly. The `type=”email”` tells the browser to validate as email and show an appropriate keyboard on mobile. The error message uses `role=”alert”` so screen readers announce it when it changes. You’re not adding complexity—you’re using HTML correctly.</p> <p>Semantic HTML isn’t extra work. It’s the baseline.</p> <h2>Accessibility Is Just Semantic HTML (And It Costs Nothing)</h2> <p>People treat accessibility as a separate initiative: “We’re doing an accessibility audit.” It’s not separate. Accessibility is built-in when you use semantic HTML.</p> <p>Use `<button>` for buttons. It’s keyboard navigable by default. It’s announceable by screen readers. It’s focusable. Use `<a>` for links. Use `<input type="email">` for email fields. Use `</p> <nav>` for navigation.</p> <p>When you use semantic HTML, accessibility is automatic. When you don’t, accessibility is a hack built on top of incorrect markup.</p> <p>I’ve audited codebases where developers added ARIA attributes to divs to make them behave like buttons. `role=”button”` on a div. `tabindex=”0″` to make it focusable. Why? Because they didn’t use `<button>`. All of that ARIA complexity is unnecessary if you’d just used the semantic element.</p> <p>Semantic HTML > ARIA. ARIA is for edge cases when semantic HTML doesn’t exist. Not for replacing it.</p> <h2>SEO and Semantic HTML (Search Engines Care)</h2> <p>Search engines use HTML structure to understand your content. Headings tell them what your page is about. Semantic elements tell them what role different content plays. Lists tell them you have grouped information.</p> <p>A page with proper heading hierarchy and semantic elements will rank better for the same content than a page with divs and no structure. Google doesn’t say this explicitly, but their documentation is full of hints: use semantic HTML, structure your content, use heading hierarchy.</p> <p>This isn’t about gaming search engines. It’s about making your content understandable. Search engines understand better when you use semantic markup. Humans understand better too.</p> <h2>The Boring Power of Semantic HTML</h2> <p>HTML can do an incredible amount without CSS or JavaScript. Forms with validation. Inputs with specific types that trigger appropriate keyboards on mobile. Links that work without JavaScript. Keyboard navigation that’s automatic. Accessibility that costs nothing.</p> <p>Most developers rush past HTML to get to the “interesting” parts—CSS and JavaScript. They treat HTML as a container and pour everything into styling and behavior.</p> <p>The professionals I respect treat HTML as the foundation. They get the structure right. They use semantic elements. They test without CSS. Then they add CSS and JavaScript as enhancements.</p> <p>A well-structured HTML page without any CSS or JavaScript is still usable. A beautiful page built on bad HTML is a nightmare to maintain, broken for accessible users, and fragile when you change styles.</p> <h2>When NOT to Use HTML (And Use Something Else)</h2> <p>Don’t use HTML for styling. That’s CSS’s job.</p> <p>Don’t use HTML for interaction. That’s JavaScript’s job.</p> <p>Don’t use HTML for data storage. That’s the database’s job.</p> <p>Don’t nest semantic elements incorrectly. Don’t put a `</p> <ul>` inside a `</p> <p>`. Don’t put a `<button>` inside an `<a>`. The HTML spec exists for reasons.</p> <p>Don’t use tables for layout. Tables are for tabular data. Full stop.</p> <p>Don’t add `onclick` to divs when you should use `<button>`. Don’t add custom data attributes when semantic HTML already exists.</p> <h2>FAQ</h2> <h3>Is HTML actually important? Can’t I just write divs and style them?</h3> <p>You can, but you’re working against the web instead of with it. Semantic HTML is shorter, more maintainable, accessible by default, better for SEO, and keyboard navigable without extra work. “Just divs” works until it doesn’t—usually when a screen reader user shows up or you try to modify the code six months later. Semantic HTML is the professional approach.</p> <h3>Do I need to memorize all HTML elements?</h3> <p>No. You need to know the common ones (p, div, span, h1-h6, a, button, input, form, nav, section, article, header, footer, ul, ol, li). After that, reference the MDN docs. You’ll learn more elements as you encounter problems they solve. But the core 20 elements cover 95% of what you’ll write.</p> <h3>What’s the difference between semantic HTML and regular HTML?</h3> <p>Regular HTML (divs and spans) is generic. Semantic HTML (nav, article, button, form, etc.) has meaning. The browser and assistive technologies understand semantic HTML. Divs are containers with no meaning—they’re the fallback when no semantic element exists. Always prefer semantic.</p> <h3>How do ARIA attributes relate to semantic HTML?</h3> <p>ARIA (Accessible Rich Internet Applications) adds semantic meaning to non-semantic elements. `role=”button”` on a div tells assistive tech it’s a button. But if you’d just used `<button>`, you’d need no ARIA at all. Use ARIA only when semantic HTML doesn’t exist. Prefer semantic HTML first.</p> <h3>Does semantic HTML affect page load or performance?</h3> <p>No. Semantic elements are the same size as divs. The browser handles them the same way. The only difference is meaning—and that costs nothing. Performance improvements come from optimizing assets, caching, and code splitting, not from avoiding semantics.</p> <h3>Should I validate my HTML?</h3> <p>Yes, once. Use the W3C HTML validator to check your markup. It’ll catch errors (unclosed tags, invalid nesting, etc.). You don’t need to validate every time you refresh—just when you’re done with a feature. Valid HTML is maintainable HTML.</p> <h3>Can I use semantic HTML with my favorite framework (React, Vue, etc.)?</h3> <p>Absolutely. Semantic HTML works in all frameworks. React lets you write semantic HTML. Vue lets you write semantic HTML. They’re just rendering your markup to the DOM. Write `<button>` in React and it’ll be a `<button>` in the DOM. Nothing changes.</p> </x-turndown>