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.
Note: By default, the link opens in the same browser unless a
target
is specified.
Here is an example:
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:
The anchor tag allows users to run JavaScript by clicking on them.
Here is an example:
The anchor tag allows users to call others from their phones directly.
Here is an example:
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
Copyright ©2024 Educative, Inc. All rights reserved.