Jihad Haddad
Jihad Haddad

Reputation: 640

Difference between font-size 100% and inherit

Hej

My question is: Is setting the style font-size:inherit to an HTML tag equivalent to setting its style to font-size:100%?

As far as I understand, font-size:inherit means that the font size in the HTML tag will inherit the font-size from its parent tag, meaning it will have a font-size 100% that of its parent.

Please correct me if I am wrong. I have done several tests to prove that. However, there must be a difference, so could someone point that out to me, please?

Thanks a lot Jihad Haddad

Upvotes: 0

Views: 2206

Answers (1)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201588

By the specifications, there is no difference in the effects of font-size: 100% and font-size: inherit. The latter is newer and less widely supported, so there is a practical difference: the latter is ignored by some browsers.

Upvotes: 2

Related Questions