< b>与< b>的区别是什么?和< strong>,< i>和< em&gt ;? [英] What's the difference between <b> and <strong>, <i> and <em>?

查看:342
本文介绍了< b>与< b>的区别是什么?和< strong>,< i>和< em&gt ;?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< b> 和< strong> <<< ;在HTML / XHTML中,i> < em> 什么时候应该使用它们?

解决方案

它们对普通Web浏览器渲染引擎具有相同的效果,但它们之间存在根本区别。

正如作者在讨论列表帖子



考虑三种不同的情况:


  • 网络浏览器

  • 盲人

  • 手机



Bold是一种风格 - 当你说大胆的一个词,人们基本知道
意味着在信件的周围添加更多,比如说墨水,直到他们在其他信件中突出
为止。


不幸的是,这对盲人毫无意义。在手机
和其他PDA上,文字已经大胆,因为屏幕分辨率非常小。

< b> 是一种风格

- 我们知道大胆应该是什么样子。



< strong> 表示应该如何理解。 强在浏览器中可能(并且经常)意味着大胆,但它也可能意味着像大白鲨这样的演讲程序(对于盲人)或者用下划线代表较低的语调(因为你不能大胆地大胆)在Palm Pilot上。


HTML从来不是为了关注风格。不要 Tim Berners-Lee 语义网。 / code>是语义的 - 它描述了它所围绕的文本(例如,这个文本应该比其他文本更强壮),而不是描述

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

解决方案

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

As the author writes in a discussion list post:

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. 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) or be represented by an underline (since you can't bold a bold) on a Palm Pilot.

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 (e.g., "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 (e.g., "this text should be bold").

这篇关于&lt; b&gt;与&lt; b&gt;的区别是什么?和&lt; strong&gt;,&lt; i&gt;和&lt; em&gt ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆