Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html
css
font size
font-size

How to change the font size in HTML

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

widget

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

html
css
font size
font-size

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring