b ... ⁄b
HTML5 b element
The b element allows you to draw attention to a part of text (keywords, names) »video
About b
- is an optional element
- multiple b elements allowed per HTML5 document
Display & support b
- display in browser »video
- display type: inline





Parents, children b
- b nested within elements »b parents
- elements nested within b »b children
»examples
Attributes b
- required: none
- optional: global attributes, event attributes
Warning
The
element does not affect the importance of the text. If you want to mark up important content use the tag.- Briefly:
- draw attention - importance is not involved = tag
- highlight for its likely relevance- importance is not involved = tag
- make it important - importance is involved = tag
- put it in question (stress emphasis) - importance is not involved = tag
Syntax b
1 | <> ... </> »video |
Attributes and Values b (comma separated)
< | attribute | = | "attribute_value(s)" | > | Video | Examples |
---|---|---|---|---|---|---|
1. specific attributes | ||||||
All Specific Attributes | ||||||
2. global attributes | ||||||
1. | accesskey | = | keyboard key | »img | <accesskey="h"> ... </ > | |
2. | class | = | class name | »html »img | <class="class_name"> ... </ > | |
3. | contenteditable | = | "", , true, false | »html | <contenteditable="true"> ... </ > | |
4. | contextmenu | = | menu id value | »html | <contextmenu="menu_id_value"> ... </ > | |
5. | data-* | = | value | - | <data-http-error="404"> ... </ > | |
6. | dir | = | ltr, rtl, auto | »html | <dir="ltr"> ... </ > | |
7. | draggable | = | true, , false | »img | <draggable="false"> ... </ > | |
8. | dropzone | = | copy, move, link, string:, file: | - | <dropzone="copy"> ... </ > | |
9. | hidden | = | "", , hidden | »html »img | <hidden="hidden"> ... </ > | |
10. | id | = | id name | »html »img | <id="unique_id_name"> ... </ > | |
11. | itemid | = | URL | - | - | |
12. | itemprop | = | string | »link »a | - | |
13. | itemref | = | string | - | - | |
14. | itemscope | = | "", , itemscope | - | - | |
15. | itemtype | = | absolute URL | - | - | |
16. | lang | = | language code | »html »head»title »img | <lang="en"> ... </ > | |
17. | spellcheck | = | "", , true, false | »html | <spellcheck="true"> ... </ > | |
18. | style | = | CSS property:value | »html »img | <style="color:red"> ... </ > | |
19. | tabindex | = | integer | »img | <tabindex="3"> ... </ > | |
20. | title | = | text | »html »link»style »abbr»dfn »img »meter | <title="html page"> ... </ > | |
21. | translate | = | "", yes, no | »html »img | <translate="yes"> ... </ > | |
All Global Attributes | ||||||
3. global event attributes | ||||||
1. | onclick | = | script | » list | <element onclick="script" > ... | |
2. | ondblclick | = | script | » list | <element ondblclick="script" > ... | |
All Event Attributes |
Video demonstration b element
HTML5 b element: draw attention to a part of text
min | video details |
---|---|
00:00 | video tutorial: b element |
00:05 | b element allows you to draw attention to a part of text |
00:16 | in this paragraph, let's draw the attention to: Light Beech and Walnut |
00:37 | Light Beech and Walnut display in bold thus drawing the attention on them |
00:40 | note: even if Light Beech and Walnut display in bold, this does not mean they are more important than the rest of the content b element should not be used to mark important content; strong element does that! |