How to make text bold in HTML?


To make text bold in HTML, use the <b>…</b> tag or <strong>…</strong> tag. Both the tags have the same functioning, but <strong> tag adds semantic strong importance to the text. The <b> tag is a physical markup element, but do not add semantic importance.

Just keep in mind that you can get the same result in HTML with CSS font-weight property.

Example

You can try to run the following code to make text bold in HTML using <strong>…</strong> tag

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>HTML text bold</title>
   </head>

   <body>
      <h2>Our Products</h2>
      <p>Developed 10 <strong>Android</strong> apps till now.</p>
   </body>
</html>

Example

You can try to run the following code to make text bold in HTML using font-weight property

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>HTML text bold</title>
   </head>

   <body>
      <h1>Tutorialspoint</h1>
      <p style="font-weight: bold;">Simply Easy Learning</p>
   </body>
</html>

Monica Mona
Monica Mona

Student of life, and a lifelong learner

Updated on: 06-Sep-2023

37K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements