Font size in HTML

Font size in HTML
 
Font size in HTML
  • Currently 0 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


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

BIG tag

<small>Text</small>

Decrease font size

SMALL tag

<h1>Text</h1>

Text as a big header

H1 tag

<h6>Text</h6>

Text as a small header

H6 tag

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.
Example 1. Usage of tag big.

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>
Example 2. Usage of tags h1, h2 and h3.

 

Read also

Formatting text in HTML

Formatting text in HTML

Text alignment in HTML

Text alignment in HTML

Image size in HTML

Image size in HTML

CSS: working with text

CSS: working with text

Post comment

basicuse.net
html5_css
106160485398655174790

Quick navigation

General navigation