1 Thing A Week 1 Thing
A Week

Did you know you can send a SMS from HTML?

Week 204.0 — 20th September '21

Turns out you can do a lot more than just send emails using the <a> tag in HTML. Even the mailto functionality can be fairly complex, letting you specify what to populate the To, CC, BCC, subject and body of an email with.

tel:

If you use the tel: prefix for a link, you can prompt the user to confirm they want to call a number. These tags are really useful on the websites of businesses in particular. Think of a restaurant, you want to call and make a booking or an order. The number is there and if it's clickable it's a little less friction between the user and the restaurant. Gone are the days of having to copy and paste (digitally or manually), now you can click and get going.

<a href="tel:+447999999999">call me</a>

This example would attempt to call the number '07999999999', I prefixed the country code to avoid doubt but in reality you can specify it in whatever way makes the most sense to you.

sms:

The SMS protocol is quite similar to mailto: although support might vary depending on your OS. In theory you can specify multiple recipients and a body (like you can for emails) but iOS only supports the first number it encounters. If you specify a single recipient and a body, the body is appended to the number so it's best to keep it simple for the widest support.

<a href="sms:+447999999999">text me</a>

This would initiate the compose window in your SMS client to the number '07999999999'.

Support for third party apps

There are also protocols for a whole range of apps, you can see a pretty good list at beradrian's blog. Support will depend on your OS and the apps you have installed.

More from 1 Thing A Week
« Filling the gap between gas and electric cars: PHEVs Making better use of Twitter threads Initial thoughts on the iPhone 14 Pro Why I can't wait for the :has() pseudo-class in CSS »

Advertisement

Notable

Quick links and commentary on interesting articles, videos and more throughout the week.

  1. 204.1 – Monday
    1. AI movie posters noahveltman.com
    2. Rubin's Galaxy apod.nasa.gov
    3. Pfizer coronavirus vaccine safe, effective in children, company says axios.com
  2. 204.3 – Wednesday
    1. iPhone 13 Pro camera review: Tanzania austinmann.com

Jump to notable items for Week #203, Week #205 , view the notable archive or my favourites.

About 1 Thing A Week

A website curated by @cchana bringing you 1 Thing A Week, delivered every Monday morning.

You can find a list of all articles in the archive, or read the most popular.

Find out more about 1 Thing A Week or read the privacy policy.

Market

Visit the market and support 1 Thing A Week.

You can find 1 Thing A Week on Twitter, Facebook, Instagram & Reddit