It's All About IT

Cool attributes of anchor tag you should know

Anchor tag in HTML

Mailto : Opens a mailing app when clicked.

click to open email link in html

For example : <a href=””>Contact Now</a> will compose a mail to     Try it yourself and provide valueable feedback.

Dial a Number : Dials a number when clilcked

For example : <a href=”tel:9800000000″ >Call Now</a> will automatically take you to the dial pad of your phone with number prefilled.

Send SMS : Sends a Text Message to someone.

For example : <a href=”sms:980000000000″>Send Message</a> will automatically take you to the messaging app with number prefilled.

Send Whatsapp Message from html link

Whatsapp click to chat

You can also create a link to start whatsapp chat with someone just by clicking that link. This works fine only in Mobile, on desktop you have to setup whatsapp web before testing

Here are some other attributes of anchor tag which might be helpful for your

attributes of anchor tag in html

Rel=”Nofollow” – To make the link nofollow

Rel=”DoFollow” – To make the link dofollow. By default, all the links are dofollow

target=_blank – To open the link in new tab.

target = _self – To open the link in the same tab.

target = _parent – To open the link in parent Frame.

See Also : How to add WhatsApp click to chat on your website

Leave a Message

Registration isn't required.

By commenting you accept the Privacy Policy