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

General Discussion

e-mail help

Hey so I went to Nick Pettit.com and noticed that his email icon brings you to "nick@nickpettit.com". I would really like to know how he did it because I would like to set one up. Thanks.

1 Answer

Hi Matthew,

It's really easy. Below is the code for that page. All you have to do is right click on the page (not on an image) and select view page source and the browser will show you the code for that page. Look at the mailto: attribute.

Jeff

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Nick Pettit</title>
    <meta name="description" content="Hi, I’m Nick Pettit. I am a designer, public speaker, teacher at Treehouse, and co-host of The Treehouse Show.">
    <meta name="viewport" content="width=device-width">
    <link href='http://fonts.googleapis.com/css?family=Josefin+Sans|Open+Sans' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/normalize-min.css">
    <link rel="stylesheet" href="css/main-min.css">
</head>
<body>

  <div id="wrapper">
    <h1 class="logo">Nick Pettit</h1>
    <section class="bio">
      <p>Hi, I’m Nick Pettit.</p>
      <p>I am a designer, public speaker,<br> teacher at Treehouse, and co-host<br> of The Treehouse Show.</p>
    </section>
    <ul class="social">
      <li><a href="http://teamtreehouse.com/nickpettit" class="treehouse" title="Treehouse">Treehouse</a></li>
      <li><a href="https://twitter.com/nickrp" class="twitter" title="Twitter">Twitter</a></li>
      <li><a href="https://www.facebook.com/nickpettit" class="facebook" title="Facebook">Facebook</a></li>
      <li><a href="mailto:nick@nickpettit.com" class="email" title="Email">Email</a></li>
    </ul>
  </div>

  <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
  <script>
    var _gaq=[['_setAccount','UA-425824-6'],['_trackPageview']];
    (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
    g.src='//www.google-analytics.com/ga.js';
    s.parentNode.insertBefore(g,s)}(document,'script'));
  </script>  

</body>
</html>