HTML Bold Tag

Tags for making the text bold

Sometimes, you might want some text on your web page to be displayed in bold, so as to grab user attention, or for describing this text as important. Obviously, you need to use some tag to achieve this. We have b tag for making the text bold. The text between the <b> and </b> tag becomes bold.

Alternatively, we can also use the strong tag to do so, but it defines the text as having  some strong importance. Refer to the below example for understanding the use of both tags. The content between <strong> and </strong> will be of strong importance. So it will be shown in a bold format.

<!DOCTYPE html>
<html lang=”en”>
<head>
    <meta charset=”UTF-8″>
    <meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
    <title>Some heading here…</title>
</head>
<body>
   <div>this text contains <b>some text, which is bold, made using the b tag</b>, and also some text, which has a <strong>strong importance</strong></div>
</body>
</html>

So, if we try to open the file in the browser, you can find that the text between the <b> and </b> is displayed as bold text. Also, the text between the <strong> and </strong> is displayed as bold, since it is defining the text of strong importance. Have a look at the output –