Html 带有链接的 HTML5 标记地址 mailto

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8794216/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 12:24:38  来源:igfitidea点击:

HTML5 TAG ADDRESS mailto with links

html

提问by Miki

I want include one e-mail link on my website. And i want ask if i use a href mailto i need use address tag? And i yet want include twitter and facebbok profile link there. I need address tag to be valid?

我想在我的网站上包含一个电子邮件链接。我想问一下我是否使用 href 邮件我需要使用地址标签?我还想在那里包含 twitter 和 facebbok 个人资料链接。我需要地址标签才有效吗?

回答by jcmeloni

You do not need to have <address>to make a valid document, and if you have other links in there besides email, it is not invalid or even necessarily wrong. It's only really "wrong" if you're using <address>to markup any old address information, regardless of context.

你不需要<address>制作一个有效的文件,如果你在那里有除了电子邮件之外的其他链接,它不是无效的,甚至不一定是错误的。如果您使用<address>标记任何旧地址信息,而不管上下文,那只是真正“错误” 。

The <address>tag is used to indicate contact information for the owner or maintainer of the document/site. For example, if you are using it to indicate the owner of the document/site you might use:

<address>标签用于指示文档/站点的所有者或维护者的联系信息。例如,如果您使用它来指示您可能使用的文档/站点的所有者:

This site is maintained by: 
<address>
   <a href="mailto:[email protected]">Miki</a>
</address>

If you want to add other information related to contacting the person in the <address>area, you can:

如果您想添加与联系该<address>地区的人相关的其他信息,您可以:

This site is maintained by: 
<address>
   Miki (<a href="mailto:[email protected]">email</a>, <a href="http://twitter.com/someone">twitter</a>, etc)
</address>

Here's some straightforward infoabout the <address>element.

这是有关该元素的一些简单信息<address>