Links
(Hypertext) Links in HTML are a way to link to:
- Other web pages
- Internal web pages
- Sections on the current web page
Links are created using the a
element with the href
attribute. The content of the element is the text that the user sees, and the value of the href
attribute is the destination the user will be redirected to when clicked.
This code:
<a href="https://en.wikipedia.org/">Link to Wikipedia</a>
Will be displayed like this:
Link to WikipediaWe see the content of the element as text, but it will link us to the page specified in the href
attribute. This means that the content can be any text and it won't change the destination the a
element redirects us to.
Instructions
After the last div element, create a Hypertext link (a element) with the content 'Source' that links to this page: 'https://en.wikipedia.org/wiki/Cat'.
Start programming for free
2/10