|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: What is grouping ?
Answer: Grouping is gathering (1) into a comma separated list two or more selectors that share the same style or (2) into a semicolon separated list two or more declarations that are attached to the same selector (2).
1. The selectors LI, P with class name .first and class .footnote share the same style, e.g.: LI {font-style: italic} P.first {font-style: italic} .footnote {font-style: italic}
To reduce the size of style sheets and also save some typing time they can all be grouped in one list. LI, P.first, .footnote {font-style: italic}
2. The declarations {font-style: italic} and {color: red} can be attached to one selector, e.g.: H2 {font-style: italic} H2 {color: red} and can also be grouped into one list: H2 {font-style: italic; color: red}
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7823 users |
Added on |
4/2/2013 |
Views |
71064 |
Rate it! |
|
|
Question:
What is grouping ?
Answer:
Grouping is gathering (1) into a comma separated list two or more selectors that share the same style or (2) into a semicolon separated list two or more declarations that are attached to the same selector (2).
1. The selectors LI, P with class name .first and class .footnote share the same style, e.g.: LI {font-style: italic} P.first {font-style: italic} .footnote {font-style: italic}
To reduce the size of style sheets and also save some typing time they can all be grouped in one list. LI, P.first, .footnote {font-style: italic}
2. The declarations {font-style: italic} and {color: red} can be attached to one selector, e.g.: H2 {font-style: italic} H2 {color: red} and can also be grouped into one list: H2 {font-style: italic; color: red} Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is class?
|
View Answer
|
|
If background and color should always be set together, why do they exist as separate properties?
|
View Answer
|
|
How do I center block-elements with CSS1?
|
View Answer
|
|
What is CSS?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All CSS Interview Questions & Answers - Exam Mode /
Learning Mode
|