HTML/XHTML中<b><strong><i><em>之间有什么区别?什么时候使用?

推荐答案

他们有same effect on normal web browser rendering engines个,但他们之间有fundamental difference个.

正如作者在a discussion list post年中所写:

想想三种不同的情况:

  • 网络浏览器
  • 盲人
  • 手机

"大胆"是一种风格——当你说"bold a word"时,人们基本上知道这一点

不幸的是,这对盲人来说毫无意义.在手机上

100 is a style.我们知道"大胆"应该是什么样子.

不过,100只有is an indication of how something should be understood只.在浏览器中,"strong"可能意味着"大胆"(通常也确实如此),但它也可能意味着像Jaws(盲人)这样的语音程序的音调较低,或者在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").

Html相关问答推荐

为什么html复选框总是具有只读属性?

打印pdf时100 vh迪夫有半页高

为什么这个高度为100%的页面会出现滚动条?

单独处理Button:Focus的多行按钮

Bootstrap 5.3.2模式页脚左填充还是左边距?

为什么根捕获上的`min-height`溢出,而`height`没有?

根据Tailwind CSS中的子计数而非子宽度进行对齐,并水平对齐

顶部有文字的图像的悬停效果

在屏幕上每行 css 中的特定列居中

伪元素:after和溢出隐藏

带圆角帽的 CSS 部分边框

水平填充容器内的空间

使用flex wrap时,如何设置另一个元素的宽度与换行后的元素对齐?

视频添加到 Html 与 Github 不同步

有没有办法在 Flutter 中创建这个浮动标签表单?

如何动态调整彼此重叠的两个 div 的大小,使它们在增长时保持相同的高度

如何使用 CSS 使粘性元素固定在视口顶部

提交前的验证表单未显示任何验证消息?

在 html 邮箱的左侧和右侧制作多个元素很热门吗?

font awesome 的 CDN/CSS 如何工作?