Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set font size for my entire HTML webpage using CSS?

Hello I am a new beginner to CSS, and I wondered if anyone could help to advise how I could set the font size for my entire webpage?

The tutorials I've been looking at just show me how to set font size for each separate section. I am using the same font-size for 99% of my page, so I don't want to have to code each and every single new paragraph, table row, cell, etc.

I'm already using a simple code for changing the font family for the ENTIRE page (see below), so I am assuming there is a simple code for the size that does the same.

    <style>
    *{font-family: Verdana;}
    </style>

Thank you!

like image 993
rogue_otter Avatar asked Oct 21 '25 07:10

rogue_otter


1 Answers

You can use font-size in the same wildcard selector:

* { 
  font-size: 1rem;
}

Keep in mind that the wildcard selector * carries the least specificity; any font sizes declared elsewhere will override this declaration.

like image 109
Obsidian Age Avatar answered Oct 22 '25 20:10

Obsidian Age