HTML Links and Images

HTML
<a href="https://developer.mozilla.org">Visit MDN</a><br>
<a href="https://example.com" target="_blank" rel="noopener">Open in a new tab</a><br>
<a href="#section2">Jump to a section on this page</a><br>
<a href="mailto:info@example.com">Send an email</a>
AttributePurpose
hrefDestination URL
target="_blank"Open in a new tab
rel="noopener"Security for new tabs
downloadDownload the linked file instead of opening it

Images

HTML
<img src="photo.jpg" alt="Students in the computer lab" width="300" height="200">

Always add an alt attribute: screen readers read it aloud, and browsers show it if the image fails to load.

HTML
<figure>
    <img src="chart.png" alt="Sales chart for 2026">
    <figcaption>Figure 1: Monthly sales</figcaption>
</figure>
Track your progress through the HTML course