LESSON 03 / 04

Links & Images

The web is a web because of links. Add links to other pages and sections, and images with good alt text.

๐ŸŽ“Beginnerlevel
โฑ๏ธ30 minto finish
โœ๏ธ2activities

๐Ÿ“‚ HTML: The Structure๐Ÿท๏ธ HTML

๐ŸŽฏ 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.