HTML5 University

Hyperlinks

Links are how webpages are connected on a website and throughout the internet. Links can be internal or external, and can their behavior can be modified depending on how they are created.


Internal Links

The following adds a hyperlink to a local file:



<a href="../index.html">Home Page</a>

which would result in:

Home Page

External Links

The following adds a hyperlink to an external website:



<a href="https://www.google.com/">Google</a>

which would result in:

Google

The target Attribute

This attribute is used to determine where to open a link.



<a href="https://www.google.com/" target="_blank">Google</a>

which would result in:

Google