Learn how to write modern, structured, and accessible HTML using semantic tags and proper labeling.
<header>, <footer>, <main>, <section>, <article>, <nav>alt for images, aria-label, proper form labelingSemantic tags give meaning to the content, making it easier to read for humans, search engines, and assistive technologies.
<header>
<h1>My Website</h1>
</header>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<main>
<section>
<h2>About Me</h2>
<p>This is a section about myself.</p>
</section>
<article>
<h2>Blog Post</h2>
<p>This is an article about HTML.</p>
</article>
</main>
<footer>
<p>© 2026 My Website</p>
</footer>
Accessibility ensures everyone can use your site, including users with disabilities.
alt attributes for images:<img src="photo.jpg" alt="Description of the photo">
aria-label for custom controls or icons:<button aria-label="Close menu"></button>
<label> with form inputs using for attribute.Convert a simple HTML page to use semantic tags and improve accessibility:
<header>, <footer>, <main>, and <section> where appropriate.alt text.<nav> with links to different sections/pages.<header>
<h1>My Portfolio</h1>
</header>
<nav>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<main>
<section id="about">
<h2>About Me</h2>
<p>I am learning semantic HTML to make my pages structured and accessible.</p>
<img src="myphoto.jpg" alt="Photo of me">
</section>
<section id="projects">
<h2>My Projects</h2>
<article>
<h3>Project 1</h3>
<p>Description of project 1.</p>
</article>
</section>
</main>
<footer>
<p>© 2026 My Portfolio</p>
</footer>