Explain briefly about Cascading Style Sheet?

1 answer

Answer

1131065

2026-08-19 04:30

+ Follow

Cascading Style SheetsCSS style sheets are blocks of code that can be embedded in a HTML page or stored in a .css file.

CSS manipulates the elements of a HTML webpage by changing the properties of the HTML elements in the page, such as BODY P or TABLE elements.


CascadingCascading or the Cascade refers to how the the final style will render, if the first block in a CSS sheet defines that all P tags will have black text and be font type Arial, then that will be the case for all P elements. But if in another block further down the page resets the P tag to have text that is green then all text in the P elements will be green. But all P tags will still have Arial type font.

Example Code:
Block 1
p {
color: #000000; /* Set to Black */
font-family: Arial;

}

Block 2
p {
color: #00FF00; /* Set to Green*/

}

And in the case that another Block sets the P tag to have a background color of Blue:

Block 3
p {
bacground-color: #0000FF; /* Set to Blue */

}

Then the final Cascade will result in the P tag being:

Final Cascade
p {
bacground-color: #0000FF; /* Set to Blue */
color: #00FF00; /* Set to Green*/
font-family: Arial;

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.