HTML and CSS Reference
you're done. Depending on how the user's browser and email client are configured,
mailto links might not work at all for them.
The mailto URL is different from the standard URL form. It looks like the following:
Here's an example:
If your email address includes a percent sign ( % ), you'll have to
use the escape character %25 instead. Percent signs are special
characters to URLs.
Unlike the other URLs described here, the mailto URL works strictly on the client side.
The mailto link just tells the browser to compose an email message to the specified
address. It's up to the browser to figure out how that should happen. Most browsers will
also let you add a default subject to the email by including it in the URL like this:
When the user clicks the link, most browsers will automatically stick Hi there! in the
subject of the message. Some even support putting body text for the email message in the
link, like this:
mailto:email@example.com?subject=Hi there!&body=Body text.
File URLs are intended to reference files contained on the local disk. In other words,
they refer to files located on the same system as the browser. For local files, URLs have
an empty hostname (three slashes rather than two):
You'll use file URLs a lot when you're testing pages you've created locally, although
it's easier to use the browser's “Open File” functionality or drag and drop to open local
files in your browser than it is to type in a file URL. Another use of file URLs is to cre-
ate a local startup page for your browser with links to sites you use frequently. In this
instance, because you'll be referring to a local file, using a file URL makes sense.
The problem with file URLs is that they reference local files, where local means on the
same system as the browser pointing to the file—not the same system from which the