How to create button to open SMS compose to a phone number using HTML ? Last Updated : 30 Jan, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report Sometimes, when you search for a number on the web, you might want to SMS to it directly from the web page instead of noting it down and then messaging to it. It becomes quite convenient for the user. Making an SMS link is very easy in HTML. Here, we will see how to make the SMS link on a webpage. Using <a> href attributeEnter the phone number in place of the URL and add SMS: before it to make an SMS link. Add the text between the tags that will appear as the clickable link. Syntax:<a href="sms:(countrycode)(number)"> Text </a>Approach:Create an HTML file and structure it with a title.Add a paragraph describing the purpose, and include a <a> tag with an href attribute containing "sms:+911234567890", where the phone number is placed after the colon.Insert the desired clickable link text between the <a> tags, such as the phone number "+91-123-4567-890".This creates a button-like link that, when clicked, opens the SMS compose with the specified phone number.Example 1: In this example, we will see how to open SMS compose to a phone number using HTML for Single Recipient. html <!DOCTYPE html> <html> <head> <title> Create button to open SMS compose to a phone number </title> </head> <body> <p> For any queries you can text us at the below number: </p> <a href="sms:+911234567890"> +91-123-4567-890 </a> </body> </html> Output: Syntax: <a href="sms:(countrycode)(number), (countrycode)(number), ...."> Text </a>Approach:Create an HTML file and structure it with a title.Add a paragraph describing the purpose, and include an <a> tag with an href attribute containing "sms:+911234567890,+11234567890", where multiple phone numbers are separated by commas.Insert the desired clickable link text between the <a> tags, such as "Send a SMS".This creates a link that, when clicked, opens the SMS compose with the option to send a message to multiple recipients.Example 2: In this example, we will see how to open SMS compose to a phone number using HTML for Multiple Recipient. html <!DOCTYPE html> <html> <head> <title> Create button to open SMS compose to a phone number </title> </head> <body> <p> Send text to multiple recipients: </p> <a href="sms:+911234567890, +11234567890"> Send a SMS </a> </body> </html> Output: Comment More infoAdvertise with us Next Article How to create a basic popup button using jQuery Mobile ? P prakhar7 Follow Improve Article Tags : Web Technologies HTML HTML-Misc Similar Reads How to create a Mini Button using jQuery Mobile ? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be making a Mini Button using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ 1 min read How to connect Skype, Mail and Phone using HTML ? Connecting to Mail: Mailto link is a default way to sending a mail when the consumer wants to communicate or wants to give feedback, then by clicking the mailto link will open a default sending mail window. So we can use mailto which direct to the mail once the form is submitted. Using mailto we can 3 min read How to create button which belongs to one or more forms in HTML5 ? In HTML, the <button> tag is used to create a clickable button on your webpage. It also has a closing tag written as </button>. You can add a text or image, whatever you want to display a button, within the <button> tag. The type attribute for a <button> tag should always be 2 min read How to create a basic popup button using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a basic popup button using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ 1 min read How to create an image acting as a submit button using HTML5 ? In this article, we will learn how to create an image that acts as a submit button i.e. whenever we click on an image in the form, it will be automatically submitted to the server. The default type of <input> type attribute is text. Here, we use a simple approach to complete the task. Syntax 2 min read How to Add a Telephone Number into a form using HTML? In this article, we will learn how to add a telephone number field to an HTML form. Telephone numbers have numerous advantages and are an important component of contact forms, allowing for direct communication with the user. Users can receive messages or notifications regarding the services provided 2 min read Like