|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: What does the "Cascading" in "Cascading Style Sheets" mean?
Answer: Style Sheets allow style information to be specified from many locations. Multiple (partial) external style sheets can be referenced to reduce redundancy, and both authors as well as readers can specify style preferences. In addition, three main methods can be employed by an author to add style information to HTML documents, and multiple approaches for style control are available in each of these methods. In the end, style can be specified for a single element using any, or all, of these methods. What style is to be used when there is a direct conflict between style specifications for an element? Cascading comes to the rescue. A document can have styles specified using all of these methods, but all the information will be reduced to a single, cohesive "virtual" Style Sheet. Conflict resolution is based on each style rule having an assigned weight according to its importance in the scheme of things. A rule with a higher overall importance will carry a higher weight. This will be used in place of a competing style rule with a lower weight/importance. A hierarchy of competing styles is thus formed creating a "cascade" of styles according to their assigned weights. The algorithm used to determine this cascading weight scale is fairly complex.
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8926 users |
Added on |
4/2/2013 |
Views |
67509 |
Rate it! |
|
|
Question:
What does the "Cascading" in "Cascading Style Sheets" mean?
Answer:
Style Sheets allow style information to be specified from many locations. Multiple (partial) external style sheets can be referenced to reduce redundancy, and both authors as well as readers can specify style preferences. In addition, three main methods can be employed by an author to add style information to HTML documents, and multiple approaches for style control are available in each of these methods. In the end, style can be specified for a single element using any, or all, of these methods. What style is to be used when there is a direct conflict between style specifications for an element? Cascading comes to the rescue. A document can have styles specified using all of these methods, but all the information will be reduced to a single, cohesive "virtual" Style Sheet. Conflict resolution is based on each style rule having an assigned weight according to its importance in the scheme of things. A rule with a higher overall importance will carry a higher weight. This will be used in place of a competing style rule with a lower weight/importance. A hierarchy of competing styles is thus formed creating a "cascade" of styles according to their assigned weights. The algorithm used to determine this cascading weight scale is fairly complex. 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 |
|
Why use Style Sheets?
|
View Answer
|
|
How do I get rid of the gap under my image?
|
View Answer
|
|
How do I design for backward compatibility using Style Sheets?
|
View Answer
|
|
What are pseudo-classes?
|
View Answer
|
|
Can Style Sheets and HTML stylistic elements be used in the same document?
|
View Answer
|
|
Can CSS be used with other than HTML documents?
|
View Answer
|
|
How to use CSS to separate content and design ?
|
View Answer
|
|
Why was the decision made to make padding apply outside of the width of a 'box', rather than inside, which would seem to make more sense?
|
View Answer
|
|
Why call the subtended angle a "pixel", instead of something else (e.g. "subangle")?
|
View Answer
|
|
What is attribute selector?
|
View Answer
|
|
What is parent-child selector?
|
View Answer
|
|
How can I specify background images?
|
View Answer
|
|
How do I have a fixed (non-scrolling) background image?
|
View Answer
|
|
What are inline, block, parent, children, replaced and floating elements?
|
View Answer
|
|
Which set of definitions, HTML attributes or CSS properties, take precedence?
|
View Answer
|
|
How do I eliminate the blue border around linked images?
|
View Answer
|
|
How do I combine multiple sheets into one?
|
View Answer
|
|
Why does my content shift to the left on some pages (in FF)?
|
View Answer
|
|
How do I place text over an image?
|
View Answer
|
|
Which browsers support 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
|