This text appears in red
This text appears in green
C-Style Comments H2 {color: blue} /* All Headers Displayed in Blue */ CSS Properties Background: color – The Background Color Color: color – The Text Color Font-family: “font name” – The Font to Be Used Font-size : size/units (e.g 12pt or 1in) Font-style: italic Font-weight: bold, demi-bold, demi-light, extra-bold, extra-light, light, medium Line-height – distance between lines Margin-left Margin-right Margin-top Text-align: left, center, right Text-decoration: italic, line-through, none, underline Text-indent More CSS Properties List Styles List-style-image:URL (newbullet.gif)} List-style-type: disc,circle,square,decimal,upperalpha,lower-alpha,upper-roman,none UL {list-style-image:URL(newbullet.gif)} Cursor: auto, crosshair, default,hand,text,help,wait Downloadable Fonts Give the URL Where Font Can Be Found Layers CSS is the Foundation for Dynamic HTML Allows Script to Reference an HTML Property E.g ButtonClick Changes Text Color Other Useful Tags / Information Allows an Arbitrary Division of an HTML Document Attributes Only Apply Within the Tags Allows “Custom Tags” ID, NAME Attributes Give a Tag Instance a Unique Name, ID Allow a Specific Tag To be Referenced Through Dynamic HTML All HTML Tags Now Have the STYLE Attribute Example1 Example2 Future HTML Deprecated Tags May Not Be Supported in Future Versions of HTML CSS Alternative Recommended Basefont Center Font Strike Underline XHTML 1.0 Requires Strict Conformance Must Conform to One of DTDS Strict, Transitional, Frameset Must Be Well-Formed Elements, Attributes in Lower Case Attribute Values Must Always Be Quoted Empty Elements Require End-Tags Or Short-Cut e.g In Class Exercise Convert the index.htm File That You Created Last Class to Use Style Sheets Insert the Following in the Section H1 {color:Blue} H2 {color:Red} Publish it to your Web Site Use an external W3C Style Sheet to Display the Same Page Link These to Your Class Web Page Lab Work HomeSite HTML Validation For More Information CSS http://www.w3c.org/Style/CSS http://stars.com/Authoring/Style/Sheets/ http://www.westciv.com/style_master/house/tutorials/in dex.html ... Sheet Grouping H1 {color: green} H2 {color:green} H3 {color:green} Can Be Written: H1 H2 H3 {color: green} Style Sheet Classes User Defined Classes P.stoptext {color: red;... TYPE=text/css”> Style Sheet “Libraries” W3C Core Styles http://www.w3.org/StyleSheets/Core/stylename Eight Core Styles For demo: http://www.w3.org/StyleSheets/Core/preview.html Style Sheet... are Same on Macs, PCs 216 Color Palette Netscape, IE “Map” Them to Common Colors RGB–00 ,33 ,66,99,CC,FF 65, 536 Colors Colors Will Vary Somewhat on Macs, PCs 16.7 million Colors Expect Dithering