HTML b tag

HTML b tag bolds a span of text relative from normal text. It is used to focus the attention of users on keywords.

Example


<p>Firstly the thief enters in the victim's room.Then he steals <b>money</b>, <b>jewellery</b> and <b>kills</b> the victim.</p>

Try </>

Specific Uses

1-Bold text draws the attention of user effectively. It is used to highlight keywords.

Example

<p>Html <b>tables</b>, <b>lists</b>, <b>paragraphs</b>, <b>heading</b>, <b>media</b> are the basic html elements</p>

Try</>

2-b element can also be used with I element.

Example


<p>The italic text can also be <b><i>bolded</i></b>.</p>
Try</>

3-The content inside b element can also be formatted using CSS properties.

Example

<style>
b{
 font-size:18px;
 color:white;
 background-color:lightgreen;
 border:1px solid green;
 padding:8px;
 font-family:Arial;
}
</style>

Try</>

Note: It should not be confused with <strong> element. Because b element is just to format text. While <strong> element is used where caution, note or tip is to write.

Tag omission

Both starting and ending tags are necessary for the b element.

Global Attributes

All the global attributes are applicable on the b element.



Was this article helpful?

 

Email:

Message:

Get the newsletter