<b>


HTML <b> Tag

Instance

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
</head>
<body>

<p>这是一个普通的文本- <b>这是一个加粗文本</b>。</p>

</body>
</html>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

All major browsers support< b> tag.


Tag definition and usage instructions

<b> Tag definition bold text.


Differences between HTML 4.01 and HTML5

None.


Tips and Notes

Notes: According to the HTML 5 specification, the <b> tag should be used as a last resort, only when no other tags are compared Use it only when appropriate. HTML 5 specification states: Titles should be represented by <h1> - <h6> tags, emphasized text should be represented by <em> tags, important text should be represented by <strong> tags, marked or high Highlighted text should be represented by a <mark> tag.

Tip: You can also use the CSS "font-weight" property to set bold text.


Global attributes

<b> tag supports HTML global attributes.


Event attributes

<b> tag supports HTML event attributes.