If i apply line-height : inherit
on html
element then from where does it inherit the line-height
value. Because apparently html has no parent from which it can inherit its styles. Does it inherit from the system (OS)?
Asked
Active
Viewed 146 times
-1
1 Answers
0
There are different ways an element can have some specific style:
css applied by your css
css default style for each element this values are applied by default, you can check some default values here
css applied by the browser, each browser puts its on default styles, this article can help you to normalize this problem.
HTML tag inherit its default styles from browser or OS?
it inherit its default styles from the browser.

Community
- 1
- 1

Renzo Calla
- 7,486
- 2
- 22
- 37
-
Ok that answers my first question that from where HTML tag inherits its default styles. So if i have to change my "line-height" for entire document then i only have to assign new line height (numeric value in pixels) to my HTML tag and inherit that wherever i want in entire document. – RK_15 Feb 04 '19 at 13:04
-
yes all the descendant elements will inherit from html, consider that not all the properties are inherited you can check this list https://stackoverflow.com/a/5612360/2894798 – Renzo Calla Feb 04 '19 at 13:09
Hello world
– RK_15 Feb 04 '19 at 12:38