Anchor Element
The anchor tag can be used to create a hyperlink that allows a visitor to follow the reference to a different web page.
By default, a hyperlink is distinguishable from normal text because it is underlined and appears in blue (or purple if visited).
Attributes
Attribute | Value |
---|---|
href | The path (URL) to the webpage or resource that the link will lead to once it is clicked by the user. |
Example
Code:
<html> ... <body> <p> This is an example of a <a href="anchor.html" >hyperlink</a>. </p> </body> ... </html>
Screen Output:
This is an example of a hyperlink.