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

HTML HTML Basics Going Further with HTML Email Links and Entities Challenge

What am i doing wrong?

What am i doing wrong?

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>My Page</title>
  </head>
  <body>
    <h3>Design & Development</h3>
    <p>Contact me at <a href="email@example.com">email@example.com</a></p>
    <p>Ā© 2017</p>
  </body>
</html>
Michael Hulet
Michael Hulet
47,912 Points

Hey Jessica and oywa!

It looked like the email address y'all used was potentially a private email address, so I changed it to something a bit more generic. Remember: This is a public forum, and the questions and answers here are visible to everybody, including Google, Bing, and any script that might be crawling for personal information to harvest. If you don't want a personal identifier like an email address exposed, it's a good idea to make sure you don't post it here as part of any question, comment, or answer, even in a code example. I hope y'all have a great and safe time learning about code!

1 Answer

Inside your <a href>, try "mailto:email@example.com". Hope it helps!

Michael Hulet
Michael Hulet
47,912 Points

I'm on the fence about whether to redact this, but I'm in a good mood, so I'll just comment instead. However, it's frowned upon here to post answers that can be copy/pasted into a challenge and just work without explanation. In the future, please be sure to explain why the code you post does the trick. For now, it's a quick one, so I'll explain:

In an HTML anchor link, the browser parses the protocol before anything else. The protocol of the URL scheme is everything at the beginning of the URL, up to the colon (:). The most common are things like http and https, but there are a few special ones you can use to open apps on the user's computer other than a web browser, like mailto:, which opens the user's email client and starts composing an email to the specified address, or tel: which calls the specified phone number. The developer of an app can tell a user's operating system that it knows how to open URLs that start with any particular protocol, and a web browser on the user's computer can see that, and will use that app to open any protocol that it doesn't recognize. In the case of mailto:, that might be Apple's Mail app if the user is on an iOS device or Mac, or Outlook if the user is on Windows. Whatever the user sets are their default email program is what will be opened, and it'll start a new message to the email address you specify