HTML <b> tag

HTML <b> tag : Definition

• HTML <b> tag is used to display the written text in bold format.

• In HTML 5 it’s recommended to use the <b> tag only as a last resort, when it is not possible to use other tags.

== Important Note ==

• The text written within <b> </b> tag only, will be displayed in bold size.



<b> tag example 1:

  <p>This is normal text - <b>and this is bold text</b>.</p> 


Output:


  

This is normal text - and this is bold text.



<b> tag example 2: using style sheet


 <!DOCTYPE html>
<html>
<head>
  <title><b> tag example</title>
<style>
.bold{
  font-weight: 700;
}
</style>  
</head>
<body>
<p>This is normal text size.</p>
<p class="bold">This is bold text size using font-weight.</p>
</body>
</html>


Output:


  

This is normal text size.

This is bold text size using font-weight.