CBSE Class 10 Computer Applications
Question 54 of 56
Cascading Style Sheets (CSS) — Question 8
Back to all questions 8
Question Question 8
Explain the purpose of using the shorthand Margin property.
We can specify the margins of all sides of an element in one single declaration by using the Margin shorthand property.
The syntax for shorthand Margin property is as follows:
Margin : top-value right-value bottom-value left-value;
where value = length | percentage | auto
For example, to define the margins for the <P> element, we will use the following rule:
P {margin: 20px 40px 60px 80px}