How to change font size in HTML?

There are there ways to change font size using CSS to HTML file.

1. Inline CSS : using "style" Attribute.

<p style="font-size: 20px; font-size: 16px;">This is a paragraph with inline CSS.</p>

2. Internal CSS: CSS rules within a <style> element in the <head> section of your HTML.

<style>
p {
font-size: 20px;
}
</style>

3. External CSS: Using "<link>" element an external css file linked to the HTML file.

<link rel="stylesheet" href="styles.css">
<!-- styles.css -- >
p {
font-size: 20px;
}

Go from files to website in seconds.

Start a free trial for 7 days — no credit card required

Get Started for Free