CBSE Class 10 Computer Applications Question 26 of 37

Cascading Style Sheets (CSS) — Question 6

Back to all questions
6
Question

Question 6

Which one of these name and value declarations would not work ?

  1. margin:20px 0 0 30%;
  2. margin;20px 30%:
  3. margin:20px 30%;
  4. margin:20px 23px 5% 30px;
Answer

margin;20px 30%:

Reason — In CSS, declarations follow the format of property: value;. The value is assigned to the corresponding property, separated by a colon : and terminated by a semicolon ;.
The option margin;20px 30%: has an incorrect syntax. The semicolon ; should be a colon : before the value and the colon : at the end should be a semicolon ;.