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?的更多相关文章
- HTML中strong与b,em与i标签的区别
先看效果 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <titl ...
- h1/title,b/strong,i/em 的区别
< strong > 表示html页面上的强调(emphasized text), < em > 表示句子中的强调(即强调语义) 1.b和strong的区别 盲人朋友使用阅读设 ...
- b和strong,i与em的区别
html语义化标签: 1)title与h1的区别 title与H1是不能划等号的 1.H1是大标题的意思.一般出现网页文章页面,作用如同一张报纸的大标题,使用读者在没看内容之前就 大概了解本文的旨意, ...
- HTML <b>、 <strong> 、<big>、<small>、<em>、<i>、<sub>和<sup> 标签
HTML <b> 标签 所有浏览器都支持 <b> 标签. 定义和用法 <b> 标签规定粗体文本. 注释:根据 HTML5 规范,在没有其他合适标签更合适时,才应该把 ...
- HTML 文本格式化<b><big><em><i><small><strong><sub><sup><ins><del>
<b> 标签-粗体 定义和用法: <b>标签规定粗体文本. 提示和注释 注释:根据 HTML5 规范,在没有其他合适标签更合适时,才应该把 <b> 标签作为最后的选 ...
- HTML标签<b>与<strong>以及<i>与<em>的区别
在一般情况下,<b>和<strong>标签的显示效果一样,<i>和<em>标签的显示效果一样.那么它们的区别在哪呢?我们应该使用哪种标签呢? 在w3sc ...
- em标签和strong标签的区别
今天模拟面试,第一个问题就是这个,然后我回答说就是表示强调,然后老师说还有吗,我说不知道了,然后,就没有然后了... 第一个层次的区别: <em>标签是告诉浏览器把其中的文本表示为强调的内 ...
- <strong>和 <b> 的区别
前几天,看到这样的一个笑话:甲:“我精通前端开发”,乙:“strong和b的区别是什么?” 甲:.... 其实我也搞不清有什么区别,因此我整理了一下: 一.为什么会有这样一个问题 我们在一个没有附加式 ...
- 标记重要和强调的文本 strong & em
strong元素表示内容的重要性,而em则表示内容的着重点. 根据内容需要,这两个元素既可以单独使用,也可以一起使用. 例如: ... <body> <p><strong ...
随机推荐
- ztree获取当前选中节点子节点id集合的方法(转载)
本文实例讲述了ztree获取当前选中节点子节点id集合的方法.分享给大家供大家参考.具体分析如下: 要求:获取当前选中节点的子节点id集合. 步骤: 1.获取当前节点 2.用ztree的方法trans ...
- 如何消除MyEclipse导入jQuery库后出现的错误标记
由于MyEclipse提供比较严谨的js校验功能,因此jQuery等前端框架导入到MyEclipse后均会提示错误,比较难看,如果要将校验去掉可以遵循下面步骤:1.点击菜单“MyEclipse”-&g ...
- cursor or set-based
标题可能和正文不太相符.我主要是记录工作中遇到使用游标的语句改成普通set-based operation,执行时间快了很多. 1.游标语句 declare @startDate dateTime d ...
- !+"\v1" 能判断浏览器类型吗?
我在 http://www.iefans.net/ie-setattribute-bug/ 中看到如此判断是否是IE,if(!+"\v1"){IE代码}else{其他浏览器代码}, ...
- (转载)solr时区问题解决方案
solr默认的使用的是utc格林尼治时间,与我们的GMT+8相差8个小时,网上好多解决办法是在自己应用中的时间上加8个小时和减8个小时做变换:或者不用date类型,改为long. 个人感觉这两个办法都 ...
- TIJ——Chapter Eight:Polymorphism
The twist |_Method-call binding Connecting a method call to a method body is called binding. When bi ...
- hp-pa安装oracle和bash
一.安装oracle数据库 安装之前先进行环境检查: 1.检查系统版本 #uname -a 2.查看内存大小 #/usr/contrib/bin/machinfo | grep -i Memory 3 ...
- weblogic10异常:org.hibernate.hql.ast.HqlToken
转自:http://www.programgo.com/article/68682994452/ 在做查询的时候,报出 org.hibernate.QueryException: ClassNotF ...
- c++的构造函数
我刚学的知识:c++的构造函数.在在此之前一直都处于迷惑之中,现在怕忘.所以赶紧把他写下来,用来以后复习,可能有错误的地方,请大牛们指出来.c++知识相对与c来说更加抽象,但真明白了,也就那一回事.这 ...
- Java注解详解
Java1.5引入了注解,注解作为程序的元数据嵌入到程序中.注解可以被一些解析工具或者编译工具进行解析.我们也可以声明注解在编译过程或者执行时产生作用. 创建Java自定义注解: package co ...