Skip to content
Related Articles

Related Articles

Improve Article

How to define important text using HTML5 ?

  • Last Updated : 27 May, 2020

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:




<!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:






<!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

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :