![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455211/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455213/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455215/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455216/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455219/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455229/pasted-from-clipboard.png)
- Better degree of formatting
- Easily maintainable websites
- Faster to access
- Quicker to download
- Can be adopted for different mediums
CSS Versions
- W3C published the CSS Level 1 Recommendation in 1996.
- A year later, the CSS Level 2 Recommendation
- CSS2.1, become an official W3C Recommendation until June 2011.
- CSS2.1 standard was being worked on, a different group at the W3C was working on a CSS3 draft.
Browser Adoption
- While Microsoft’s Internet Explorer was an early champion of CSS, its later versions (especially IE5, IE6, and IE7) for Windows had uneven support for certain parts of CSS2.
- In fact, all browsers have left certain parts of the CSS2 Recommendation unimplemented.
- CSS has a reputation for being a somewhat frustrating language.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455268/pasted-from-clipboard.png)
CSS Syntax
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455285/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455286/pasted-from-clipboard.png)
Properties
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455296/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455297/pasted-from-clipboard.png)
Properties
Properties
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455301/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6455303/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6468934/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6468992/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6468997/pasted-from-clipboard.png)
Element Selectors
selects all instances of a given HTML element
Grouped Selector
Universal Selector
Inheritance selector
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6469038/pasted-from-clipboard.png)
Class Selectors
Simultaneously target different HTML elements
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6469042/pasted-from-clipboard.png)
ID Selectors
Target a specific element by its ID attribute
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6469049/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6469053/pasted-from-clipboard.png)
Attribute Selectors
Selecting via presence of element attribute or by the value of an attribute
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6469071/pasted-from-clipboard.png)
Pseudo Selectors
Select something that does not exist explicitly as an element
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6476522/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6476536/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6476543/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6479980/New_Doc_2019-08-26__1_.jpg)
Contextual Selectors
Select elements based on their ancestors, descendants, or siblings
Cascade: Styles Interact
Principles to handle cascades (conflicts)
-
Inheritance
-
Specificity
-
Location
Specificity Algorithm
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488022/pasted-from-clipboard.png)
Location
When inheritance and specificity cannot decide
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488076/pasted-from-clipboard.png)
Box Model
think inside the box
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488097/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488148/pasted-from-clipboard.png)
Collapsing Margins
Width and Height
- The width and height properties specify the size of the element’s content area.
- Only block-level elements and non-text inline have a width and height.
- By default the width of and height of elements is the actual size of the content.
- For text, it is font size and font face;
- For images - the width and height of the actual image in pixels
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488520/pasted-from-clipboard.png)
Element size with content-box
Element size with border-box
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488529/pasted-from-clipboard.png)
Limitations of height property
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488534/pasted-from-clipboard.png)
Overflow property
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1107703/images/6488538/pasted-from-clipboard.png)
CSS
By chetankr
CSS
This deck represents information about Cascaded Style Sheets
- 1,256