70 likes | 239 Views
Chapter 1. CS332A Advanced HTML Programming. Cascading Style Sheets (CSS) Hypertext Markup Language (HTML) Basic web markup language. Styles A collection of the attributes (font, size, bold, etc.) Identified and named Gives documents a ‘Common look’. 5. Cascading Style Sheets
E N D
Chapter 1 CS332AAdvanced HTML Programming • Cascading Style Sheets (CSS) • Hypertext Markup Language (HTML) • Basic web markup language • Styles • A collection of the attributes (font, size, bold, etc.) • Identified and named • Gives documents a ‘Common look’ 5 • Cascading Style Sheets • A collection of the attributes (font, size, bold, etc.) • May be set in a central location to affect entire documents • Not HTML • CSS Properties (DHTML/CSS page 7) 6 • CSS Rule • A single description of the properties for every occurrence of a specific tag
Chapter 1 CS332AAdvanced HTML Programming • CSS Rules • HTML Selector • Text portion of an HTML Tag • <h3> …. </h3> Heading Tag – h3 is the selector • Selector • ‘Selector’ identifies the HTML tag to be manipulated • Is an HTML Tag, Class, or ID • Format • SELECTOR {property:value;} • Class • Can be applied to any HTML Tag • Name the class as needed • .anyname{font:bold 12pt times;} • ID • Applied to any HTML Tag • Usually only used once on a page • Creates an object for use with JavaScript • #object1{position: absolute; top: 10px;} 11
Chapter 1 CS332AAdvanced HTML Programming CSS Rules Syntax Selectors: Identify the rule Property: Identifies the attribute being defined Value: The state of the attribute 12 brackets SELECTOR {PROPERTY:VALUE;} colon semicolon HTML Tag- or -Class- or - ID
Chapter 1 CS332AAdvanced HTML Programming • Selectors • Property attributes are dependent upon the tag • Block-Level Tags(DHTML/CSS Page 15) • Center , h1-7, ol, p, table, ul, etc. • Table 1.2, Page DHTM:14 • Inline Tags(DHTML/CSS Page 15) • b, I, u, sub, sup, font etc. • Table 1.3, Page DHTM:15 • Replaced Tags(DHTML/CSS Page 15) • img, textarea, input, etc. • Table 1.4, Page DHTM:15 • Properties for tags: • Appendix B: Page DHTM:537