Basic and Advance CSS Examples and Concepts Question:
Download Job Interview Questions and Answers PDF
How To Group CSS Definitions Together?
Answer:
If you have multiple CSS definitions to be applied to the same HTML tag, you can write them together delimited with semicolon (;). The following CSS provides you a good example of CSS definition groups:
pre.code {background-color: #efefef; width: 502px;
margin: 4px; padding: 4px}
The above CSS code is identical to the following CSS code:
pre.code {background-color: #efefef}
pre.code {width: 502px}
pre.code {margin: 4px}
pre.code {padding: 4px}
pre.code {background-color: #efefef; width: 502px;
margin: 4px; padding: 4px}
The above CSS code is identical to the following CSS code:
pre.code {background-color: #efefef}
pre.code {width: 502px}
pre.code {margin: 4px}
pre.code {padding: 4px}
Download Cascading Style Sheet CSS Interview Questions And Answers
PDF
Previous Question | Next Question |
What Are the Pseudo Classes on <A> Tags? | What Is Style Property Inheritance in CSS? |