Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

Links

(Hypertext) links in HTML let us link to:

  1. other websites,
  2. other pages of the same website,
  3. a part of the current page.

Links are created with the a element (a stands for anchor) and its href attribute (hypertext reference). The content of the element is the text the user sees, and the value of the href attribute is the address the user goes to after clicking.

This code:

<a href="https://en.wikipedia.org/">Link to Wikipedia</a>

Will be displayed like this:

Link to Wikipedia

We see the content of the element as text, but clicking it takes us to the page in the href attribute. So the content can be any text: it doesn't change where the link leads.

Instructions

  1. 1

    After the last div element, create a link (an a element) with the content Source that leads to this page: https://en.wikipedia.org/wiki/Cat.

Back

2/14

  1. 1. Attributes
  2. 2. Links
  3. 3. Quiz: Links
  4. 4. Opening Links in a New Tab
  5. 5. Relative Links
  6. 6. Images
  7. 7. Quiz: Images
  8. 8. Image Accessibility
  9. 9. Videos
  10. 10. Images as Links
  11. 11. In-Page Links
  12. 12. Page Structure
  13. 13. Main Content and Sections
  14. 14. Summary
Next

Try it yourself

Do this exercise right here in your browser. No account needed.