HTML and CSS Reference
Fixing that error
Okay, this looks pretty simple to fix. You just need to add an
alt attribute to your <img> elements in HTML5. Go ahead
and open “lounge.html”, make the change, save, and then
let's try to validate again.
<title> Head First Lounge </title>
<h1> Welcome to the New and Improved Head First Lounge </h1>
<img src="drinks.gif" alt="Drinks">
Join us any evening for refreshing
<a href="elixir.html"> elixirs </a> , conversation and
maybe a game or two of <em> Dance Dance Revolution </em> .
Wireless access is always provided; BYOWS (Bring
your own web server).
<h2> Directions </h2>
You'll find us right in the center of downtown
Webville. If you need help finding us, check out our
<a href="directions.html"> detailed directions </a>.
Come join us!
You k now the a lt attrib ute;
add i t into th e <img> e lement.
Why do you think the alt attribute is required in HTML5?