![]() |
VOOZH | about |
To bold the text in HTML, we can use either <b> tag or <strong> tag. The browsers display the <b> and <strong> tags content in same way. The <b> tag is used to bold the text, while <strong> tag used to bold the text and shows the importance of text. We can also use CSS font-weight property to bold the text.
The <b> tag is used to make text bold for styling purposes. It does not add any extra significance or meaning to the content. It simply makes the text visually bold.
Output
Bold Text in HTML
Sample: This text is bold
The <strong> tag also makes text bold, but it has additional meaning. It indicates that the enclosed content is important or should be emphasized, which benefits both accessibility (screen readers may give it special attention) and SEO.
Output:
The font-weight property is highly customizable. It can give you more control over visual, as you can set different level of boldness and apply them across multiple elements.
Output:
Related article:How to Bold Text using CSS for detailed explanation.
There are three different options to bold the text in HTML, but these have different use cases -