Open your HTML in VS Code. Look at it for 2 minutes.
Every HTML document has this structure:
<!DOCTYPE html> <html lang="en"> <head> <!-- Metadata, title, styles --> </head> <body> <!-- Visible content --> </body> </html>
Check your code: Does it have all these parts?
<head>
Look at your <head> section. You might find:
<title>
<meta charset>
<meta viewport>
<link>
<style>
Question: What's your page's <title>? Is it meaningful?
<body>
Everything users see goes in <body>.
Look at your code:
<div>
Look through your code and find examples of:
<h1>
<h6>
<p>
<a>
<img>
Don't know what a tag does? Ask AI or check MDN
Some tags have attributes - extra information inside the opening tag.
<a href="https://babson.edu">Babson</a> <img src="photo.jpg" alt="A description">
Find in your code:
Does your code have any lists? Look for:
<ul>
<ol>
<li>
<dl>
<dt>
<dd>
Navigation menus are often built with <ul> + <li> + <a>
Semantic = meaningful
Compare these two approaches:
<!-- Non-semantic (what AI often generates) --> <div class="header"> <div class="nav">...</div> </div> <!-- Semantic (better!) --> <header> <nav>...</nav> </header>
Same visual result, but semantic HTML tells the browser what the content means.
<header>
<nav>
<main>
<section>
<article>
<aside>
<footer>
Count in your HTML file:
Lots of <div> and few semantic tags = "div soup"
AI often generates code like this:
<div class="header"> <div class="logo">My Site</div> <div class="nav"> <div class="nav-item">Home</div> </div> </div>
What's wrong?
<header> <h1>My Site</h1> <nav> <a href="/">Home</a> </nav> </header>
What's better?
Look at your code. Find ONE <div> that should be a semantic tag:
<div class="header">
<div class="nav">
<div class="footer">
~15% of the world's population has some form of disability.
Find all <img> tags in your code.
<!-- Bad - no alt --> <img src="photo.jpg"> <!-- Bad - useless alt --> <img src="photo.jpg" alt="image"> <!-- Good - descriptive --> <img src="photo.jpg" alt="Golden retriever playing in a park"> <!-- Decorative image --> <img src="decoration.jpg" alt="">
For each <img> in your code:
alt
alt=""
DevTools → Lighthouse → Run "Accessibility" audit
Run it on your site. What score did you get?
Don't try to fix everything at once. Pick one:
lang="en"
<html>
Make the change. Save. Test. Commit.
If you want AI to improve your HTML:
But always review what AI suggests!
<table> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>Data 1</td> <td>Data 2</td> </tr> </table>
<table>
<tr>
<th>
<td>
Tables should be used for tabular data only, not for page layout!
<!-- Audio --> <audio controls src="music.mp3"> Your browser does not support audio. </audio> <!-- Video --> <video controls width="400" src="video.mp4"> Your browser does not support video. </video>
Attributes: controls, autoplay, loop, muted
controls
autoplay
loop
muted
<!-- YouTube video (use embed URL) --> <iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID"> </iframe> <!-- Google Map --> <iframe src="https://www.google.com/maps/embed?..."></iframe>
Get embed code from YouTube: Share → Embed
These slides don't cover everything. Use MDN or ask AI for details!