em标签和strong标签的区别

来源:互联网 发布:mac ppt演讲者模式切换 编辑:程序博客网 时间:2024/06/05 17:12

区别:

  1.em是指emphasize(强调),<em>标签表示强调,<strong>则表示更强语气的强调。


  2<em>表示出来的样式是斜体,<strong>表现出来的样式是粗体
虽然<b>,<i>两个标签表示出来的样式同样分别为粗体和斜体。但是它们表示的是一种无强调意义。对于 b 和 i 标签是这样定义的:

The b element now represents a span of text to be stylistically offset from the normal prose without conveying any extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is emboldened.

// b 元素现在描述为在普通文章中仅从文体上突出的不包含任何额外的重要性的一段文本。例如:文档概要中的关键字,评论中的产品名。或者代表强调的排版方式。

The i element now represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized. Usage varies widely by language.

// i 元素现在描述为在普通文章中突出不同意见或语气或其他的一段文本,例如:一个分类名称,一个技术术语,一个外语中的谚语,一个想法等。或者代表斜体的排版方式。


  3.<em>用来局部强调,<strong>则是全局强调。从视觉上考虑,<em>的强调是有顺序的,阅读到某处时,才会注意到。<strong>的强调则是一种随意无顺序的,看见某文时,立刻就凸显出来的关键词句。斜体和粗体刚好满足了这两种视觉效果,因此也就成了<em>和<strong>的默认样式。