What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each?

ref:http://stackoverflow.com/questions/271743/whats-the-difference-between-b-and-strong-i-and-em

They have the same effect on normal web browser rendering engines, but there is afundamental difference between them.

As the author writes in a discussion list post (which unfortunately isn‘t online anymore):

Think of three different situations:

  • web browsers
  • blind people
  • mobile phones

"Bold" is a style - when you say "bold a word", people basically know that it means to add more, let‘s say "ink" around the letters until they stand out more amongst the rest of the letters.

That, unfortunately, means nothing to a blind person. And on mobile phones and other PDAs, text is already bold because screen resolution is very small. You can‘t bold a bold without screwing something up.

<b> is a style - we know what "bold" is supposed to look like.

<strong> however is an indication of how something should be understood. "Strong" could (and often does) mean "bold" in a browser, but it could also mean a lower tone for a speaking program like Jaws (for blind people). And strong on a Palm Pilot may be an underline (since you can‘t bold a bold).

HTML was never meant to be about styles. Do some searches for "Tim Berners-Lee" and "the semantic web". <strong> is semantic - it describes the text it surrounds ("this text should be stronger than the rest of the text you‘ve displayed") as opposed to describing how the text it surrounds should be displayed("this text should be bold").

What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each?

时间: 2024-07-30 19:49:56

What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each?的相关文章

HTML中strong与b,em与i标签的区别

先看效果   <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <p style="font-size: 36px"> 这是一段普通文字<br/> <strong>这是一段strong文字</str

h1/title,b/strong,i/em 的区别

< strong > 表示html页面上的强调(emphasized text), < em > 表示句子中的强调(即强调语义) 1.b和strong的区别 盲人朋友使用阅读设备阅读网络时:<strong>会重读,<b>不会 两者虽然在网页中显示效果一样,但实际目的不同.<b>这个标签对应 bold,即文本加粗,其目的仅仅是为了加粗显示文本,是一种样式/风格需求:<strong>这个标签意思是加强字符的语气,表示该文本比较重要,提醒读

HTML &lt;b&gt;、 &lt;strong&gt; 、&lt;big&gt;、&lt;small&gt;、&lt;em&gt;、&lt;i&gt;、&lt;sub&gt;和&lt;sup&gt; 标签

HTML <b> 标签 所有浏览器都支持 <b> 标签. 定义和用法 <b> 标签规定粗体文本. 注释:根据 HTML5 规范,在没有其他合适标签更合适时,才应该把 <b> 标签作为最后的选项.HTML5 规范声明:应该使用 <h1> - <h6> 来表示标题,使用 <em> 标签来表示强调的文本,应该使用 <strong> 标签来表示重要文本,应该使用 <mark> 标签来表示标注的/突出显示的文

HTML标签&lt;b&gt;与&lt;strong&gt;以及&lt;i&gt;与&lt;em&gt;的区别

在一般情况下,<b>和<strong>标签的显示效果一样,<i>和<em>标签的显示效果一样.那么它们的区别在哪呢?我们应该使用哪种标签呢? 在w3school中,各标签的定义如下: <b> 标签规定粗体文本. <strong> 标签和 <em> 标签一样,用于强调文本,但它强调的程度更强一些. <i> 标签显示斜体文本效果. <em> 标签告诉浏览器把其中的文本表示为强调的内容. w3school

HTML 文本格式化&lt;b&gt;&lt;big&gt;&lt;em&gt;&lt;i&gt;&lt;small&gt;&lt;strong&gt;&lt;sub&gt;&lt;sup&gt;&lt;ins&gt;&lt;del&gt;

<b> 标签-粗体 定义和用法: <b>标签规定粗体文本. 提示和注释 注释:根据 HTML5 规范,在没有其他合适标签更合适时,才应该把 <b> 标签作为最后的选项.HTML5 规范声明:应该使用 <h1> - <h6> 来表示标题,使用 <em> 标签来表示强调的文本,应该使用 <strong> 标签来表示重要文本,应该使用 <mark> 标签来表示标注的/突出显示的文本. 提示:您也能够使用 CSS &q

&lt;em&gt;标签与&lt;strong&gt;标签区别

<em>标签与<strong>标签区别 <em> 标签告诉浏览器把其中的文本表示为强调的内容.把这段文字用斜体来显示. 尽 管现在 <em> 标签修饰的内容都是用斜体字来显示,但这些内容也具有更广泛的含义,将来的某一天,浏览器也可能会使用其他的特殊效果来显示强调的文本.如果只想使用斜体 字来显示文本的话,请使用 <i> 标签.除此之外,文档中还可以包括用来改变文本显示的级联样式定义. 除强调之外,当引入新的术语或在引用特定类型的术语或概念时作为固

&lt;strong&gt;和 &lt;b&gt; 的区别

前几天,看到这样的一个笑话:甲:“我精通前端开发”,乙:“strong和b的区别是什么?” 甲:.... 其实我也搞不清有什么区别,因此我整理了一下: 一.为什么会有这样一个问题 我们在一个没有附加式样的html文件中加入如下哦的代码: 1 <p><b>b标签</b></p> 2 <p><strong>strong标签</strong></p> 就会看到这样的效果: 我们发现这两个标签的式样都被加粗了,那么为什

title与h1的区别、b与strong的区别、i与em的区别?

title与h1的区别 定义: title是网站标题, h1是文章主题 作用: title概括网站信息,可以直接告诉搜索引擎和用户这 个网站是关于什么主题和内容的,是显示在网页Tab栏里的: h1突出文章主题,面对用户,更突出其视觉效果,指向 页面主体信息,是显示在网页中的. b与strong的区别 定义: b(bold)是实体标签,用来给文字加粗, strong是逻辑标签,作用是加强字符语气. 区别: b标签只是加粗的样式,没有实际含义,常用来表达无强调或着重意味的粗体文字,比如文章摘要中的关

标记重要和强调的文本 strong &amp; em

strong元素表示内容的重要性,而em则表示内容的着重点. 根据内容需要,这两个元素既可以单独使用,也可以一起使用. 例如: 1 ... 2 <body> 3 <p><strong>Warning: Do not approach the 4 ?zombies<em>under any circumstances</em> 5 ?</strong>. They may<em>look</em> 6 ?frie