HTML Attributes
Attributes give elements extra information. They go in the start tag, as name="value".
The href attribute
Links use <a> with an href attribute for the destination.
Examplehtml
The src and alt attributes
Images use <img>. src is the file, alt is text shown if the image cannot load, and is read aloud by screen readers.
Examplehtml
The style attribute
Examplehtml
Quick check
Which attribute gives an image its alternative text?
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.