Tutorialspoint.dev

HTML | strong Tag

The <strong> tag in HTML is the parse tag and used to show the importance of text.

Syntax:

<strong> Contents... </strong>

Example:

<!DOCTYPE html> 
<html>
    <head>
        <title>strong Tag</title>
        <style>
            body {
                text-align:center;
            }
            h1 {
                color:green;
            }
        </style>
    </head>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2><strong> Tag</h2>
        <strong>Welcome to geeksforGeeks!</strong>
    </body>
</html>                    

Output:

Example 2: Use CSS property to set bold font weight.

<!DOCTYPE html> 
<html>
    <head>
        <title>strong Tag</title>
        <style>
            body {
                text-align:center;
            }
            h1 {
                color:green;
            }
            .gfg {
                font-weight:bold;
            }
        </style>
    </head>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2>font-weight: bold;</h2>
        <div class = "gfg">Welcome to geeksforGeeks!</div>
    </body>
</html>                    

Output:

Supported Browser: The browser supported by <strong> tag are listed below:

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


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter