Open In App

How to Write Bold Text using HTML ?

Improve
Improve
Like Article
Like
Save
Share
Report

HTML, the backbone of web content, offers various ways to emphasize text. One such method is making text bold. This guide will walk you through the process of creating bold text in HTML, ensuring your content stands out.

Bold text plays a crucial role in web content. It not only highlights important information but also improves readability by breaking up text and drawing the reader’s attention

Before that let’s first write some basic code in HTML along with text to make it bold. Below is the sample code.

HTML
<!DOCTYPE html>
<html>

<head>
  <title> Bold text using HTML tags </title>
</head>

<body>
  <p> Bold Text in HTML </p>
  <p>Sample text</p>
</body>

</html>

Now that we have written our sample HTML code, we will try to make the second <p> tag bold. To do that we have multiple approaches. Let’s discuss one by one.

Examples of Bold Text using HTML

1. Using <b> Tag in HTML:

HTML provides a tag to make the text bold using the <b> tag. We will make the second <p> tag bold using this tag. The below example code demonstrates the use of <b> tag.

Example:

HTML
<!DOCTYPE html> 
<html> 
<head> 
    <title> Bold text using HTML tags </title> 
</head> 

<body> 
    <p> Bold Text in HTML </p> 
  <p> Sample: <b> This text is bold </b> </p>
</body> 
</html>

Output:

Screenshot-2024-03-19-113630

Making Text Bold using <b> tag

2. Using <strong> Tag in HTML:

You can also use the strong tag to make the text bold. You can use any of them but the main difference between the strong and b tags is that the strong tag also represents semantic meaning. The below example code shows the usage of a strong tag.

Example:

HTML
<!DOCTYPE html> 
<html> 
<head> 
    <title> Bold text using HTML tags </title> 
</head> 

<body> 
    <p> Bold Text in HTML </p> 
  <p> Sample: <strong> This text is bold </strong> </p>
</body> 
</html>

Output:

Screenshot-2024-03-19-113630

Making text Bold using tag

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Last Updated : 19 Mar, 2024
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads