Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Font Size - Whats does em do?

Status
Not open for further replies.

Phil99

Programmer
Jul 12, 2002
32
GB
Hi

I'm creating a stylesheet at the moment. I need to set the font size which seems ok using:

font-size: 7pt;

But i've also seen the following statement used:

font-size: 1em;

Please can you confirm when em should be used and what affect it has on the font size.

Many Thanks

Phil
 
w3schools.com said:
one em is equal to the current font size of the current element

Basically, an EM is the width of the letter M for your current font size. Generally, EMs are used for font sizing instead of points so users that have their browser text size set to something other than the default can see the text clearly. If you set all of your fonts to point sizes, visually impaired people may have a difficult time in viewing your website.

- George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top