By
Raqueebuddin Aziz
July 5, 2023
Freelance Web Designer & Developer
By
July 5, 2023
Freelance Web Designer & Developer
The b
tag can be used to make text bold.
Wrap whatever text you want to bold with the b
tag.
See more examples on our <b>instagram page</b>
The b
tag was the only way to make text bold or emphasize an important part of a sentence before the introduction of CSS
and strong
tag.
Let’s see how to use these modern alternatives.
If your goal is to make the font bold, you should use the font-weight
CSS property with value bold
or 700
.
See more examples on our <span style="font-weight: bold">instagram page</span>
If your goal is to mark some text in a paragraph or sentence as important, you should use the strong
tag. It will still make the font bold but that is completely optional and you are free to use the font-weight
CSS property to reset the font to normal weight.
See more examples on our <strong>instagram page</strong>
<!-- OR WITH DEFAULT WEIGHT -->
See more examples on our <strong style="font-weight: normal">instagram page</strong>
The b
tag is kind of deprecated with the introduction of CSS
and strong
tag, and you should instead use modern alternatives to what it was designed to do as they convey more meaning and thus are more accessible.
Leave a comment down below, if you knew about these modern approaches
© 2024 Raqueebuddin Aziz. All rights reserved.