tags:

views:

29

answers:

2

What are pros and cons to define font-size for body?

what if somewhere i will need font smaller and bigger than body?

will i get body font size (12px) + needed font size for <p> (10px) = 22

Should we always keep same value for body font size which we want to use content paragraph?

+2  A: 
  1. It's good to define a global value, that changes relatively (em) or absolutely (px) when needed.
  2. No, the pixel values won't add up. However, if body is defined as 12px and p is defined as 2em (a relative unit), then p will be 24px.
  3. Again, it's good to define base globals so values are easier to predict.
Delan Azabani
A: 

I defined it right in the body, and just override it by tag or class where appropriate. I don't see any problem defining a "default" font-size on the body.

Chris
Should we always keep same value for body font size which we want to use content paragraph?
metal-gear-solid
Not necessarily. For example, your `body` might set as 16px, while `p` content paragraphs are defined as `0.75em` (equating to `12px`) - as you want long text passages to be slightly smaller.
Delan Azabani
@Delan Azabani - Then if we will define different sizes for all elements after body then what is the benefit to define font-size for body. is it just to make global control?
metal-gear-solid