Interview Questions

What is initial value?

CSS Interview Questions and Questions


(Continued from previous question...)

81. What is initial value?

Initial value is a default value of the property, that is the value given to the root element of the document tree. All properties have an initial value. If no specific value is set and/or if a property is not inherited the initial value is used. For example the background property is not inherited, however, the background of the parent element shines through because the initial value of background property is transparent.

<P style="background: red">Hello <strong>World </strong> </P>
Content of the element P will also have red background

(Continued on next question...)

Other Interview Questions