Font size in HTML

There are several ways to change the font size - for example, you can use headers h1, h2, h3, h4, h5, h6 or tags big and small. Table 1 contains some of the ways with descriptions and examples.
Table 1. Tags to change the font size.
HTML code | Description | Example |
---|---|---|
<big>Text</big> | Increase font size | |
<small>Text</small> | Decrease font size | |
<h1>Text</h1> | Text as a big header | |
<h6>Text</h6> | Text as a small header | |
In addition, the text size can be set with CSS - in typograpical points, pixels, or other units. There is another way - to create the text in a graphic program and add it to a web page as an image.
Tags big and small can be repeated several times, thus increasing or decreasing the text to desired size (example 1).
Example 1. Usage of tag big.
Using tags to increase fonts, one can achieve <big><big>great</big></big> results.
From the tags listed in the table the most used are h1, h2 and h3. They are designed to create headers to sections and indicate their relative importance. For instance, by default the text in the tag h1 is displayed in bold with the size of 24 points. The tag h2 has already size of 18 points, and h3 - 14 points (example 2).
Example 2. Usage of tags h1, h2 and h3.
<h1>Header 1</h1> <h2>Header 2</h2> <h3>Header 3</h3>