HTML Bold TagHTML bold tag is represented by <b> tag. HTML <b> tag is used to display the written text in bold format. It is strictly a presentational element. If you want to show your text in bold letters and not have real semantic meaning, put it within <b>.......</b> tag.
Difference between HTML <b> and <strong> TagThe <b> tag is explicit, whereas the strong tag is semantic. The <strong> tag adds extra semantic meaning to the HTML document. It is recommended to use <strong> tag for bold format. <b> Tag
<strong> Tag
Examples of HTML Bold TagCode: HTML bold tag exampleTest it NowOutput: Hello guys, this is the method to write bold text. NOTE: According to HTML5 specification, b tag should be used only if no other tag is appropriate. For example, If you want to write a heading, use the header tag <h1> to <h6>. Important statements should be denoted within <strong>.....</strong> tag, and the text you want to mark or highlight must be put within <mark>...</mark> tag.There is also a CSS 'font-weight' property to set bold text. The font-weight CSS property is one more method for setting text as strong or boldly in HTML, and it offers all the more fine-grained command over the level of strength. This is the way it connects with the <b> and <strong> labels: Example 1:Output: This is a bold content Example 2: Nested Bold TagCode: Output: Javatpoint offers Technical Content and Articles Example 3: List ItemsCode: Output:
Example 4: Combining other tagsCode: Output:
Example 5: Bold HeaderCode: Output:
Supporting Browsers
Note: HTML b tag also supports the global and event attribute in HTML.Next TopicHTML base Tag |