HTML: Email

Hyper Text Markup Language

Markup:

<a href=”mailto:someone@namref.com”> = Email Link
<form action=”#” method=”post” enctype=”text/plain”> = Email Form

Example of Link to mail

<a href=”someone@namref.com”>Email Today!</a>


Example of Link to mail with a subject

HTML Code

Result

<p>This is an email link:
<a href=”mailto:someone@namref.com?Subject=Hello%20Friend” target=”_top”>Send Mail</a>
</p>
This is an email link:
Send Mail
Note: Spaces between words should be replaced by %20 to ensure that the browser will display the text with correct spacing.

Example of a form

HTML Code

Result

<h3>Send e-mail to someone@NamRef.com:</h3>

<form action=”mailto:someone@example.com” method=”post” enctype=”text/plain”>
Name:<br>
<input type=”text” name=”name”><br>
E-mail:<br>
<input type=”text” name=”mail”><br>
Comment:<br>
<input type=”text” name=”comment” size=”50″><br><br>
<input type=”submit” value=”Send”>
<input type=”reset” value=”Reset”>
</form>

Send e-mail to someone@namref.com:

Name:

E-mail:

Comment:

 

Leave a Reply