Welcome & how this tutorial works
This tutorial is about building HTML that won't fall apart when:
- Your CSS is rewritten
- Your framework changes
- Your brand is redesigned
Instead of tying markup to a specific look ("blue-box", "left-column", "bootstrap-row2), you'll learn to describe what your content is, and let CSS handle how it looks.
What you'll learn
By the end of this tutorial, you'll be able to:
- Explain the difference between semantic and presentational HTML
- Structure pages with landmarks (
<header>,<nav>,<main>,<article>,<section>,<footer>) - Avoid fragile patterns that break when CSS frameworks change
- Refactor non-semantic "div soup" into understandable, resilient markup
- Apply semantic HTML consistently, whether you use BEM, utility classes, or CSS-in-JS
- Use a repeatable checklist when you build or review HTML
How to use this tutorial
Each lesson focuses on one idea:
- Short explanations with code examples
- Occasional "Interactive example" suggestions you can try in your own editor
- "Quick check" questions to confirm you've got the core idea
- "Previous / Next" rails so this can live as one long, scrollable page
Interactive example: naked HTML vs styled HTML
Try this in a simple index.html:
<body>
<header>
<h1>Dev Journal</h1>
<nav aria-label="Main navigation">
<a href="#articles">Articles</a>
<a href="#about">About</a>
</nav>
</header>
<main id="articles">
<article>
<h2>Learning Semantic HTML</h2>
<p>Today I refactored my first div soup…</p>
</article>
</main>
<footer>
<small>© 2025 Dev Journal</small>
</footer>
</body>- Open it without any CSS. Notice how it's still readable and structured.
- Then add any styling system you like (custom CSS, utilities, design system). The HTML doesn't need to change.
That's the spirit of this whole tutorial.