What is the anchor tag?
The HTML Anchor tag is used to create hyperlinks to other webpages, emails, applications, and items.
Note: By default, unvisited links will appear blue, visited links will appear purple, and active links will appear red.
The following codes show working examples for each code.
Opening a webpage in a new window
Note: By default, the link opens in the same browser unless a
targetis specified.
Here is an example:
Linking an email
The anchor tag allows users to send emails from their outlook installed on their computers directly.
Here is an example that shows how email code can be added:
Adding a JavaScript
The anchor tag allows users to run JavaScript by clicking on them.
Here is an example:
Linking a phone number
The anchor tag allows users to call others from their phones directly.
Here is an example:
Attributes
You can add the following attributes to your anchor tag. Each is specifically designed to carry out a particular task.
Other attributes, such as rel, show the relationship between documents and the
Free Resources