<a> tag in HTML is mainly used for the call to action. When the user clicks the <a> tag it promotes to action. <a> tag like undergo with 3 stages when the user clicks it.
- unvisited link
- visited link
- active link
These 3 stages can be selected using CSS as explain in button style effect. There are different attributes of <a> tag in HTML which are discussed below and certain activities are done when clicks are done. We can also write multiple attributes in a single <a> tag.
<a href=”http://220.127.116.11/wp-content/uploads/2019/01/HSL.png” download>Your Custom text or image.</a>
HREF attribute is used to identify the different section in the URL. It mainly consists of two sections. One section is the URL of the document and second section is the anchor text by which clickable text.
There are different types of anchor text. Here is the list of anchor text.
The hreflang attribute specifies the language of the document in the link.
<a href=”http://18.104.22.168″ hreflang=”en”>
Relation Between document
Here we will specify the relationship with current document and linked document.
The nofollow attributes are used by the search engine link Google to specify that search spider does not follow that link. To get SEO advantage many of the people do spam comments to link their website, nofollow tells the search engine not to follow that link.
<a rel=”nofollow” href=”http://22.214.171.124″>
The next and prev attributes
<a rel=”next” href=”http://126.96.36.199/next”>
<a rel=”prev” href=”http://188.8.131.52/previous”>PREVIOUS</a>
<a rel=”license” href=”http://184.108.40.206/license”>
<a rel=”help” href=”http://220.127.116.11/help”>Document help</a>
We can use a tag in HTML for contact call to action. We contact people by their phone number and email address. It is better to write attributes because it allows people to contact by just clicking the links text. It saves people time to manually typing the number.
Enclose the contact in <address> tag of HTML because it is good for SEO purpose and maintain the hierarchy. The <address> tag defines the contact information for the author/owner of a document or an article.
Target the linked webpage
Opens the linked document in a new window or tab.
<a href=”http://18.104.22.168″ target=”_blank”>Underline Jobs</a>
- _self Opens the linked document in the same frame as it was clicked (this is default)
- _parent Opens the linked document in the parent frame
- _top Opens the linked document in the full body of the window
- frame name Opens the linked document in a named frame