【问题标题】:How to start a new line in an email in HTML?如何在 HTML 中的电子邮件中开始一个新行?
【发布时间】:2013-08-01 18:11:16
【问题描述】:

我正在尝试创建一个 HTML 电子邮件链接,并且我正在尝试在正文中开始一个新行,但我不知道如何执行此操作。这是我的代码:

<a href="mailto:youremail.yahoo.com?subject=Email
 &body=This is an email. This is a new paragraph.">Click to send email</a>

我希望电子邮件正文在“这是一封电子邮件”之间换行。和“这是一个新段落”。我该怎么做?

【问题讨论】:

    标签: html email line newline paragraph


    【解决方案1】:

    您需要使用回车(%0D)和换行(%0A)的十六进制表示

    不保证您的用户会将 HTML 设置为电子邮件应用程序中的默认样式。

    <a href="mailto:youremail.yahoo.com?subject=Email
    &body=This is an email.%0D%0AThis is a new paragraph.">Click to send email</a>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-11
      • 2011-11-12
      • 2019-02-08
      • 1970-01-01
      • 2022-11-20
      • 2015-12-15
      • 2014-03-22
      相关资源
      最近更新 更多