Link Search Menu Expand Document

Link to External Pages with Anchor Elements

Summary

  • The a (anchor) element is used to link content outside of your web page.
  • a elements need a destination web address called an href attribute as well as anchor text.

Final Code

<h2>CatPhotoApp</h2>
<main>
  <a href=https://www.freecatphotoapp.com>cat photos</a>
  <img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
  <p>Kitty ipsum dolor sit amet, shed everywhere...</p>
  <p>Purr jump eat the grass rip the couch scratched sunbathe...</p>
</main>