Basics of CSS - Cascading Style Sheets - Part I

1. CSS stands for Cascading Style Sheets
2. A style sheet is a collection of rules that affects the appearance of the document
3. Using CSS you can give your page a distinct look and a uniform branded style.
4. If you create a uniform style sheet for your site you can revise that single file
5. There are three ways to inserting a style sheet into document
a. External Style Sheet: when the style is applied to many pages then an external style sheet is ideal way. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the

tag. The tag goes inside the head section
b. Internal Style Sheet:

An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the tag.
c. Inline Styles (use the style attribute in the relevant tag).
d. Multiple Style Sheet (Even multiple external style sheets can be referenced inside a single HTML document)
6. When there is more than one style specified for an HTML element than all the styles will “cascade” into the following rules:
a. Inline style (inside an HTML element)
b. Internal style sheet (inside the tag)
c. External style sheet
d. Browser default

Leave a Reply