Open In App

How to define important text using HTML5 ?

Last Updated : 27 May, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
In this article, we define an important text by using the <strong> tag in HTML. It is the parsed tag and used to show the importance of the text. It reflects the text as bold. Syntax:
<strong> Contents... </strong>
Example 1: html
<!DOCTYPE html>
<html>

<head>
    <title>
        How to define important
        text in HTML?
    </title>

    <style>
        body {
            text-align: center;
        }

        h1 {
            color: green;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>

    <h2>
        How to define important
        text using HTML5?
    </h2>

    <strong>
        Welcome to GeeksforGeeks!
    </strong>
</body>

</html>
Output: Example 2: html
<!DOCTYPE html>
<html>

<head>
    <title>
        How to define important
        text in HTML?
    </title>

    <style>
        body {
            text-align: center;
        }

        h1 {
            color: green;
        }

        .gfg {
            font-weight: bold;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>

    <h2 class="gfg">
        How to define important
        text using HTML5?
    </h2>

    <div class="gfg">
        Welcome to GeeksforGeeks!
    </div>
</body>

</html>              
Output: Supported Browsers:
  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Next Article

Similar Reads