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 trialEnemuo Felix
1,895 PointsDifferent syntax ?
I just clicked on the two links on the Teachers Note and found out that there might be different syntax for the mailto attribute. I found this
<a href="mailto:someone@yoursite.com?cc=someoneelse@theirsite.com&bcc=lastperson@theirsite.com&subject=Big%20News&body=Body-goes-here">Email Us</a>
And this
<a href="mailto:nowhere@mozilla.org?cc=name2@rapidtables.com&bcc=name3@rapidtables.com&subject=The%20subject%20of%20the%20email &body=The%20body%20of%20the%20email">
Send mail with cc, bcc, subject and body
</a>
I noticed the second one has &
between the bcc value and subject while the first one only has the 'and' sign. Is there any difference?
1 Answer
Matt Brock
28,330 PointsYes, there's a difference. &
is the special character for the ampersand (&). The special character, &
, will still work in an email link. Check this out: https://codepen.io/mattpbrock/pen/JOXXPM.
Enemuo Felix
1,895 PointsEnemuo Felix
1,895 PointsThank you so much Sam, I just checked out your link. However, I noticed you might have made a mistake because your "using a special character" and "without special character" have the same syntax.