Hyperlink
Hyperlink
This tag is used to add hyperlinks to your web page.The link tag <a>
is used both for linking to external web pages and for linking to individual HTML documents on the same website. This link requires one attribute:
href
- Tells where the browser should navigate to.
Examples
Links as References
Using a link to refer to an outside source for more information
<html>
<body>
<h2>Katherine Johnson</h2>
<p>
Katherine Johnson was an American mathematician whose calculations as a NASA employee were critical to the success of the first U.S. missions to space.
</p>
<a href="https://www.nasa.gov/content/katherine-johnson-biography">Click Here to learn more about Katherine Johnson</a>
</body>
</html>

External Website
Using <a>
for linking to an external web page.
<a href="https://code.org/">Visit Code.org!</a>
Page on the Same Website
Using <a>
for linking individual HTML documents on the same website
<a href="books.html">Books</a>
Syntax
<a></a>
Tips
- The link text is the part that will be visible to the reader.
- A link does not have to be text. A link can be an image or any other HTML element.
Additional Information
For more information, see http://www.w3schools.com/tags/tag_a.asp.
Found a bug in the documentation? Let us know at support@code.org.