Adding a Subject Line to an Email Link

February 11, 2010

I am always surprised with the little simple things I learn about web development. After years of working with HTML I had not yet seen the simple coding for adding a subject line to an email link.

Normally the code for an email link looks like this:

<a href="mailto:friend@yourdomain.com">mailto</a>

If you write it like this:

<a href="mailto:friend@yourdomain.com?My Special Subject">
mailto</a>

Then when it is clicked the email will have a subject of "My Special Subject."

 

 
 

Noggin's Notebook

This is my little corner to chronicle my adventures in all things web including CSS, HTML, TYPO3, PHP and whole host of other acronyms.

RSS Feed for Noggin's NotebookRSS Feed for
Noggin's Notebook