Tutorialspoint.dev

HTML | small Tag

The <small> tag in HTML is used to set small font size.

Syntax:

<small> Contents... </small>

Example 1:

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

Output:

Example 2: Use CSS property to set the font size smaller.

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

Output:

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

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


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter