How to add mailto link with multiple body lines with HTML?

Spread the love

Sometimes, we want to add mailto link with multiple body lines with HTML.

In this article, we’ll look at how to add mailto link with multiple body lines with HTML.

How to add mailto link with multiple body lines with HTML?

To add mailto link with multiple body lines with HTML, we add the %0A new line character.

For instance, we write

<a
  href="mailto:email@address.com?subject=test&body=type%20your%0Amessage%20here"
>
  send email
</a>

to set the href attribute to a mailto URL that has %0A in the body query parameter value to add a line break.

Conclusion

To add mailto link with multiple body lines with HTML, we add the %0A new line character.

Leave a Reply

Your email address will not be published. Required fields are marked *