English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML <b> tag only makes the text bold without providing any semantic meaning to the text. This tag is also commonly referred to as the <b> element.
!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5 Example by www.oldtoolbag.com</title>/title> </head> <body> <h1>Heading 1</h1> <p>We want to bold <b>this text</b>/b>.</p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <b> tag.
The <b> tag defines bold text.
The HTML <b> tag should not be confused with the <strong> tag, which will highlight the text.
The <b> tag is used for bolding text, but it does not emphasize text like the <strong> tag. In most cases, it is recommended to use the <strong> tag instead of the <b> tag.
Strong is a tag in the web standard xhtml, and the meaning of strong is "emphasize"; b is from html, and the meaning of b is bold (bold).
Why use strong instead of b? In fact, this question might be better asked: what are the differences between xhtml and html, and why should xhtml be used instead of html?
简单地说:web 标准主张 xhtml 不涉及具体的表现形式,"强调"可以用加粗来强调,也可以用其它方式来强调,比如下划线,比如字体加大,比如红色,等等,可以通过 css 来改变 strong 的具体表现,这就是为什么 b 不能替代 strong。
Tips and notesAnnotation: 5 According to HTML 5 Normative declaration: according to the norm, <b> tag should be the last choice, only to be used when no other mark is more appropriate. HTML <h1> - <h6> tag represents, emphasized text should be <em> tag represents, important text should be <strong> tag represents, the text that is marked or highlighted should be <mark> tag represents.
Tip:You can also use CSS's "font-"weight" attribute sets bold text.
Support for <b> tag Global attributes of HTML.
Support for <b> tag HTML event attributes.