Create strong text in HTML


In HTML <strong> tag is used to make text appears bold. It is a parsed tag shows importance of a text. This tag supports all global and event attributes in HTML. Following is the usage of strong tag in HTML -

<strong> text… </strong>

It has opening and closing tags. In HTML we use <b> tag for specifying bold text without extra importance.

Example

Following example demonstrates the usage of <strong> tag in HTML −

<!DOCTYPE html>
<html>
<body>
   <h1>Tutorial Point</h1>
   <p>Normal text without strong tag.</p>
   <p>
      <strong>Text with strong tag</strong>
   </p>
</body>
</html>

Example

Consider another example where text appears bold without using <strong> tag −

<!DOCTYPE html>
<html>
<head>
   <title>Usage of strong Tag</title>
   <style>
      body {
         text-align: center;
      }

      h1 {
         color: blue;
      }

      .TP {
         font-weight: bold;
      }
   </style>
</head>
<body>
   <h1>TutorialsPoint</h1>
   <h2>Font appears as BOLD</h2>
   <div class="TP">HTML Tutorial</div>
</body>
</html>   

Example

Consider another example to know more about the <strong> tag −

<!DOCTYPE html>
<html>
<head>
   <title>Usage of strong Tag</title>
   <style>
      body {
         text-align:center;
      }
      h1 {
         color:blue;
      }
      strong {
         font-weight:bold;
      }
   </style>
</head>
<body>
   <h1>TutorialsPoint</h1>
   <h2>Font appears as BOLD</h2>
   <strong>HTML Tutorial</strong>
   <p> To see effects , change default CSS Settings</p>
</body>
</html>               

Updated on: 10-Oct-2023

166 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements