What is an anchor tag?
An anchor tag is used to specify the link to another site or the same website's pages, the <a>
element can also be used to link between different sections in the document, for example within the table of content.
Here we will discuss how to implement and apply the anchor tag to link external URLs.
Basic use of anchor tag.
In the following example, there is the basic implementation of the <a>
element.
<a href="https://gitdemy.com/">Link to gitdemy.com</a>
The above syntax creates the link to the URL "https://gitdemy.com
", which is specified by the href (Hypertext Reference) attribute. When someone clicks on the hypertext "Link to gitdemy.com" the link leads to the required page.
Using external link type
You can use the external link type to indicate that the link leads to an external website. A rel="external"
attribute is used to inform the search engines that the link on a site is related to an outside website.
Read more, click the following link.
https://gitdemy.com/solution/how-to-link-to-another-site-in-html
Top comments (0)