Skip to content

HTML mailto body formatting | Not possible to add style and code

  • by

HTML mailto body formatting

The Mailto format does not support HTML code emails.

Outlook was used at 2003, but to become compliant with the mailto: standard they removed that functionality.

But you can Use %0D%0A for a line break in HTML body. See below example of it.

<!DOCTYPE html>
<html>
<body>

    <a href="mailto:[email protected]?subject=Suggestions&body=name:%0D%0Aemail:">
    Send Email</a>​


</body>
</html>

Output: After click send email link (default app is outlook).

HTML mailto body formatting

Why Can’t change the style or add code into mailto body?

You can’t change/modify CSS of a mail client through a <a href="mail to:[email protected]"></a>.

Because it have own CSS styles and this would be a security issue.

HTML mailto body bold text

It’s not possible at all to add a bold style of font in herf mailto attribute.

See in RFC 2368.

Do comment if you have any questions and suggestion on this topic

Note: The All HTML Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

Discover more from Tutorial

Subscribe now to keep reading and get access to the full archive.

Continue reading