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 Link to Email

Link to Email

Im having problems getting the subject portion showing up , the mialto values show up if i take the ? mark off the subject portion shows up in the same line as the mailto . i tried putting the <br> to correct it but it would place it in the subject portion of the email window

Hey You should put the ? after the email address followed by SUBJECT= , all between "" like my example below:

  <a href="mailto:learning@html.com?subject=Testing">mail</a>

Not very sure what you have typed?

9 Answers

Hi Lam, You have a space between ? and subject

 <h2>Contact</h2>
           <p><strong> Email:</strong><a href="mailto:coolvrexperience@gmail.com? subject=YA%20YO!">coolvrexperience@gmail.com</a>></p>
           <p><strong>Phone:</strong> 888-123-6666</p>

Remove that space and will work ;)

 <h2>Contact</h2>
           <p><strong> Email:</strong><a href="mailto:coolvrexperience@gmail.com?subject=YA%20YO!">coolvrexperience@gmail.com</a>></p>
           <p><strong>Phone:</strong> 888-123-6666</p>

i just got it

if ( isAdmin ) { message = 'Welcome admin'; }

<p><a href="mailto:learning@html.com?subject=Testing">mail</a></p>

Exactly I did this and the subject attribute and content displays in the , To: portion of the email window , it didn’t give my subject “statement “ in the subject portion of the email browser

<p><a href="mailto:learning@html.com?subject=Testing">mail</a></p>

Exactly I did this and the subject attribute and content displays in the , To: portion of the email window , it didn’t give my subject “statement “ in the subject portion of the email browser . When I use the question mark It doesn’t show the subject statement But it renders the mailto statement when I don’t use the question mark it renders subject = statement in the , To: portion of the email browser

I am very unsure as it is working on mine... the below code belongs to one of my small projects and it also works...

<ul class="main-nav">
      <li><a href="#">News</li></a>
      <li><a href="#">Services</li></a>
      <li><a href="#">What to do</li></a>
      <li><a href="mailto:sil.ramos@icloud.com?subject=Hey%20there!">Contact</li><a>
    </ul>

Can you share your workspace?

This link is also helpful if you would like to have a look.=: https://www.rapidtables.com/web/html/mailto.html

http://w.trhou.se/w34fqfyufy this is a snapshot of workspace

Hey yo ! It worked ,your awesome Silvia I appreciate you

No worries, glad to hear all is sorted :))) keep the hard work! :)

200

yes ive tried running this If() statement according to knowledge ive understood from video instructions in Javascript Basics : Write an ' If ' statement , 1 objective, Challenge Task 1 of 1

Create a conditional statement that tests if the isAdmin variable is true. If it's true, set the value of the message variable to "Welcome admin".

const isAdmin = true; const isStudent = false; let message;

if (isAdmin = true) { console.log (message); } else{ console.log () }