How do I add an email link?
Do you want to make it easier for your website visitors to email you? Oh, you could just type in your email address, and they can copy and paste it if they'd like to contact you, but the easier you make it for your visitors to contact you, the more chance there is that they will. So now you'll learn how to add email links, and how to create email submission forms.
Email Link
To add a basic email link, use this code.
<a href="mailto:YOUR EMAIL">Click to email</a>
Email Link with Subject
To add a basic email link with a defined subject heading, use this code.
<a href="mailto:YOUR EMAIL?subject=SUBJECT">Click to email</a>
Email Forms
Now you'll learn how to create email forms, or submission forms. This can get a little tricky, but very basically, you seperate it into three different sections. You're opening codes, the middle content, and the ending codes. When you begin your form submission, you start with this code.
<form method="post" enctype="text/plain" action='mailto:YOUR EMAIL'> <input type="hidden" name="To" value="EMAIL SUBJECT">
Now we have to add the center content. What you add here depends on what you want or need in your form. Below are the seperate sections of a form submission, with the corresponding codes.
This section is meant for small answers, like the persons name or email address, for example:
Please enter your name:
Please enter your name: <input type="text" name="name:" size="50" maxlength="50">
This section is meant for large answers, like a description, for example:
Please describe the problem:
Please describe the problem:<br> <textarea name="Subject" rows=5 cols=45> </textarea>
This section is meant for multiple choice answers, for example:
Please select your age group:
Under 10
10 - 15
16 - 21
22 - 30
31 - 40
41 and over
Please select your age group:<br>
<input type="radio" name="Under 10" value="Under 10">Under 10<BR>
<input type="radio" name="10-15" value="10-15">10 - 15<br>
<input type="radio" name="16-21" value="16-21">16 - 21<br>
<input type="radio" name="22-30" value="22-30">22 - 30<br>
<input type="radio" name="31-40" value="10-15">31 - 40<br>
<input type="radio" name="41 and over" value="41 and over">41 and over<br>
Now to end your form. Use this code at the very end to add the submit button, and a clear form option.
<input type="submit" value="Submit"><img src="spacer.gif" width=5 height=1 alt="spacer"> <input type="reset" value="Clear"></form>
The final result of all those codes would look something like this:
The style you see on my textareas and buttons is a result of the stylesheets I'm using to build this page You can find out how to do this in the CSS section of this site.