How to make paragraph text bold in HTML

What is HTML Bold Element?

In HTML, <b> (bold) element is used to display text in bold style in a webpage.

The bold element is purely presentational; it doesn't carry any specific semantic meaning on its own.

Example of Creating HTML Bold Text

Create an HTML <b> element in a<p> element.

Place the text 'an example of HTML bold text.' between the <b> and </b> tags as shown in the following example.

The text will be displayed in bold style in the following output.

Example of HTML Bold Element


Output of the above example

Examples of Bold Text


This is an example of HTML bold text.

<b> tag is used to display bold text


What is HTML Strong Element?

In HTML, <strong> (strong) element is used to apply bold style with importance or emphasis in a webpage.

The strong element also indicates that the enclosed text is of strong importance from a semantic standpoint.

It is best practice to use the <strong> element instead of <b> when the intention is to convey importance or emphasis.

In the following example, the text 'consectetur adipiscing elit.' is enclosed with <strong> element tag. The text will be display in bold style in the output.


Output of the above example

Examples of Strong Text


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis, arcu et consequat condimentum

<strong> tag is used to display bold text with emphasis

Live Code Playground

In the following HTML code editor, you can practice the above code by creating more new HTML bold and strong elements. Click on the 'Run Code' button to render the code; the rendered page will be displayed in the following HTML Code Output frame. Practice until you become comfortable and proficient with your code.

HTML logo HTML Online Editor
HTML Code Output