There are two tags for HTML bold text and these tags are <b> and <strong>. However, there are a few differences between these two tags which you can find out at the end of this post. You can use them to make text bold for formatting in HTML.
Use of HTML <b> tag for HTML Bold Text
You can make text bold by putting the text content inside the starting <b> tag and closing tag </b>.
It is the styling tag which can be used to make text content bold.
This makes the text stand out from the other text in the content. After making the text bold you can easily identify it from other words in the paragraph.
Let’s see the syntax of the <b> to use on your HTML pages.
With the above syntax, you can add a bold text as given in the example below.
Example
1 |
<b>This is a bold text</b> |
Output
The above example showing the bold text content. All the text content showing bold in the example. However, you have to make bold only those words which you want to highlight in the content.
How to Use HTML <strong> tag for HTML Bold Text
You can also use the <strong> tag to make text bold. However, it is not the styling tag of HTML for making text bold. If you want to emphasize more on a word, you can use the <strong> tag.
Both <b> tag and <strong> gives the same bold content in the output. A strong person means more wealthy than others. The same meaning will be applied to the strong tag to make the word more highlighted.
To use the tag, you have to put the content inside the starting tag <strong> and closing tag </strong>. See the syntax below showing the use of the strong tag in HTML.
Follow the example below to create your own strong words in the HTML content.
Example
1 |
<strong>This is a strong text</strong> |
Output
The above text showing the content with all the text in a bold state. however, you have to use it to make only the word which you want to differentiate from others.
Difference between <b> and <strong> tags
There are a few differences between these two tags which you can find out below.
- The <b> tag is the styling tag of HTML while <strong> tag is the sementic emphasis tag.
- You can use the b tag to only make the font bold. However, the strong tag can be used to give strong emphasis to the word of content.
- The b tag is presentational tag while strong tag is not a presentational tag.
- b tag makes text bold without importance while strong tag gives importance to the word.
Hope, you like this post of how to use the bold tag in HTML. If you have any query regarding the tutorial, please comment below.