How to send message to a number using HTML | HTML API

 How to send message to a number using HTML

So we can send message through HTML. How? We can send sms through <a> tag. <a> tag is use to create link in the web page but we can also send messages through it.

To Send messages through link follow these steps:

Create and Name your link

We can create link using <a> tag. The text between <a> and </a> is the name that are display on a link. You can enter any name between anchor tag.

Link attribute 

Some tags of HTML has its own attributes. Attributes are the properties of any tags. Anchor <a> tag use href attribute. Href means hypertext reference. Through attribute we can send sms. 

Insert Data into Link

Basically href is use to put the link of the tag. But in this case we will put number and message body inside href.

Example

<a href="sms:987654321&body:hi">Send me message</a>

Result

Send me message

When you click on the hyper link it will take you to the message box. 

Comments

Popular posts from this blog

Getting Started with JavaScript

JavaScript fundamentals

How to create a list group with css