Computer Applications
Explain the purpose of using the shorthand Margin property.
CSS
10 Likes
Answer
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}
Answered By
5 Likes
Related Questions
Scripting makes the web page dynamic. Explain.
Differentiate between the Font-weight and Font-variant properties.
How will you add padding space to all the four sides of an element?
Identify the errors in the codes below and write the correct code:
import url (style_imp.css)
<STYLE> p{color:808080} </STYLE>
<p style= "text:align: justify">
P {font: arial 15px sans-serif;}
{p-color:red;}