Download presentation
Presentation is loading. Please wait.
1
Cascading Style Sheets
2
What is a style sheet? >A controlling document (or part of the document) >Sets the default appearance of items on the web page.
3
Advantages >Greater control over document look and feel >Less key stroking
4
Disadvantages >Not downwardly compatible >Not implemented across browsers and platforms evenly.
5
Three ways to attach a style tag >Inline > I am so blue >Document-level >External style sheets
6
Style Syntax >Tag-selector {property1:value1; property2:value1, vaue2, value3;…}
7
Multiple Selectors >H1, H2, H3 {text-align: center} is the same as >H1 {text-align: center} H2 {text-align: center} H3 {text-align: center}
8
Contextual Selector >OL LI {list-style: upper-alpha} OL OL LI {list-style: upper-roman} OL OL OL LI {list-style: lower-alpha} OL OL OL OL LI {list-style: lower-roman} >Note: no commas used
9
Classes >Classes are subsets of a style >P.big {font-size: 18pt} P.medium {font-size: 12pt} P.small {font-size: 9pt} >Classes can be defined with out being associated with a tag.
10
Special Cases >A:link, A:active, A:visited – define the 3 states of the tag. >P:first-line P:first-letter define 2 states of
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.