Lesson 8 of 8
Best Practices
Always use meaningful alt text for images. Use the right heading level — do not skip from <h1> to <h3>. Validate your HTML using the W3C validator. Keep your code indented and readable.
Remember: HTML is about structure, not style. Leave styling to CSS.
HTML
<!-- Good: semantic and accessible -->
<header>
<nav aria-label="Main">
<a href="/">Home</a>
</nav>
</header>
<!-- Bad: using styles inside HTML -->
<p style="color:red;">Don't do this</p>