Академический Документы
Профессиональный Документы
Культура Документы
The Breakdown
All web pages can be broken down into bucketized content areas These areas can updated by changing the code on every page, - or By using cascading style sheets!
h1 {font-size:12pt; color:red}
Style Precedence
1. External style sheet 2. Embedded styles 3. Inline styles
Example
<h1 style=color:red; font-family: sanssarif>IU</h1>
Example
<style>
h1 {color:red; font-family:sans-serif}
</style>
Example
h1, h2, h3, h4, h5, h6 {color:red; fontfamily:sans-serif} Save this in a new document using a .css extension
Save this file and the .css file in the same web server directory
Attribute Selectors
Create an attribute selector to select an element based on the elements attributes.
See figure 7-13 in your text for a list of attribute selectors
Classes
HTML and XHTML require each id be unique therefore an id value can only be used once in a document. You can mark a group of elements with a common identifier using the class attribute.
<element class=class> </element>
</DIV> Class_name is the name of the class You can substitute the ID proper for the Class property (with ID, the syntax for CSS style,
Resulting text
HTML code
</span>
padding
margin
border
Carey 7.52-7.53