Jump to content

Mailto Link


fabs

Recommended Posts

i have tried this one<html><body><p>This is a mail link:<a href="mailto:someone@microsoft.com?subject=Hello%20again">Send Mail</a></p><p><b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly.</p></body></html>why we have to put %20 between Hello and again???

Link to comment
Share on other sites

it's a place holder for ' ' (literally a spacebar keystroke). This is because HTML doesn't see spaces, and so you're subject would come out as "Helloagain."

Link to comment
Share on other sites

A lot of software is designed to treat a space as the end of something. So if a space character appears in the middle of a string, the string might get cut off at the space. This can ruin a piece of data. The opposite might also happen, as thescientist points out.In situations like that, we need a way of translating a space into something that doesn't look like a space.All characters belong to a set, and each member of the set corresponds to a number, which can be written in binary, decimal, hexadecimal, etc. Hex is often preferred because 256 characters can be defined with just two digits. The most common set of characters is the ASCII set. The space character corresponds to number 32 in decimal and number 20 in hexadecimal. To encode a hexadecimal character in a url, put the % symbol in front of it.So to replace a space character with its encoded version, we use %20 .You asked about the special case of mailto: , but this applies to all URLs.I just noticed this: http://www.w3schools.com/tags/ref_urlencode.asp

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...