a shot of dev knowledge

RELATED TAGS

How to change the font size in HTML

Font size in HTML

In HTML the method of changing a font size is pretty simple and easy. All you have to do is include the tag in the code snippet below.

  • HTML

The size number must be in " ". However, keep in mind that this only works for versions before HTML 5. Let’s look at an example before we move on to changing font sizes in HTML 5.

  • HTML

Font size in HTML 5 and onwards

In HTML 5 the syntax changes. For this, the font size is changed using the CSS font-size property where the tag changes slightly. This is shown in the code snippet below.

  • HTML

Let’s look at an example below to better understand this.

  • HTML

RELATED TAGS

RELATED COURSES

View all Courses

Keep Exploring