Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
rachaelallison
9,521 Pointsproper formatting for including area code?
In this video (how to build a contact page), Nick shows that including tel:555-5555 in the href will make the phone number clickable on mobile.
what is the proper formatting for including an area code? Is it "tel:(555)555-5555"? or is it "tel:555-555-5555"?
1 Answer
Benjamin Larson
34,055 PointsHi Rachael,
The tel: URI scheme works using dashes (or just the straight numbers). I don't think it would work with the parenthesis, but you could set the hyperlink to display as such:
<a href="tel:+1-555-555-5555">(555)-555-5555</a>
Here's a boring reference for the Proposed Usage of Telephone URIs in HTML: https://tools.ietf.org/html/rfc3966#section-8