๐ฏ By the end of this lesson you canโฆ
- Create links with a href
- Open links in a new tab safely
- Add images with meaningful alt text
๐ HTML ยท CSS ยท JS
links.html
๐ Tap a line to explain it
1<p>Learn more on <a href="https://developer.mozilla.org">MDN</a>.</p>2<p><a href="about.html">About me</a></p>3<p><a href="#contact">Jump to contact</a></p>4<p><a href="https://example.com" target="_blank" rel="noopener">Opens in a new tab</a></p>5<h2 id="contact">Contact</h2>6<p><a href="mailto:hello@example.com">Email me</a></p>
๐ HTML ยท CSS ยท JS
images.html
๐ Tap a line to explain it
1<img src="https://picsum.photos/seed/learnwith/300/180" alt="A random landscape photo" width="300" height="180">2<figure>3 <img src="https://picsum.photos/seed/mango/200/140" alt="A photo used as an example" width="200" height="140">4 <figcaption>A figure with a caption.</figcaption>5</figure>
๐ก Concept check
Which attribute of
<img> is read aloud by screen readers?๐ ๏ธ Link hub
Make a list of three links: to https://www.wikipedia.org (text: Wikipedia), to https://www.khanacademy.org (text: Khan Academy), and an email link to me@example.com.
๐ Key takeaways
<a href="URL">text</a>makes a link.<img src="โฆ" alt="description">shows an image; alt describes it for screen readers.href="#section-id"jumps to part of the same page.
Finished reading & practising?
Saved in this browser. Create a free account to keep it forever.