Open In App

How to set smaller text using HTML?

Last Updated : 02 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

To create smaller text in HTML5, use the <small> tag. This element is designed specifically to reduce font size, providing a straightforward method to display text in a smaller font within web documents.

Syntax:

<small> Content... </small>

Example: The following is the explanation of how to set smaller text using HTML5.

html
<!DOCTYPE html>
<html>

<head>
	<title>
		How to set smaller 
		text using HTML5 ?
	</title>

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

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

<body>
	<h2>
		HTML5: How to define 
		smaller text?
	</h2>

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

</html>

Output:

zaz

Output

Supported Browsers

  • Google Chrome
  • Firefox
  • Opera
  • Safari


Next Article
Article Tags :

Similar Reads