1.

Describe the box model in CSS3?

Answer»

Shorthand notations are also called as shorthand PROPERTIES in CSS. That lets you set multiple VALUES of CSS properties simultaneously. It’s often good to use shorthand notations because it reduces the file SIZE and even improves the performance.

/* Example */ .border{     border-width: 1px;     border-style: solid;     border-COLOR: #000; } /* shorthand property for the above border example */ .border{     border: 1px solid #000; }

In the above example, we can see that for a border class we have written three different properties of a border (width, style, and color). Which can be written in a better way by just mentioning border and GIVING all the required values (width, style, and color). This helps in reducing the file size and even increase the performance. Similarly, there are shorthand notations for many CSS properties one of the other examples is padding and margin properties. Which takes four different values sequentially and assigns each in the clockwise direction (Top, Right, Bottom, and Left).



Discussion

No Comment Found