Cascading Style Sheet (CSS) Rules Summary
|
| Style rules can control the appearance and placement of objects on the page: Fonts, Text, Color, Borders, Images and White Spaces. |
| CSS Rules are written within the open and close style element<
<style type="text/css"> style rules
</style>
|
| Selector: curly braces property colon value
p {font-weight:bold}
|
| Local or Inline style rules are placed within the XHTML element.
<p style="text-indent:.50in">
|
| Embed style rules are placed in the head element within the style element.
<style type="text/css"> style rules
</style>
|
| Linked style sheet contains CSS rules -selector, property and value - with no tags. Saved as a text file with the extension dot css.
|
Linked style sheet format is placed in the head:
<link rel="stylesheet" type="text/css" href="mystyles.css">
Web pages can have multiple linked style sheets applied.
|
| Div and Span are container elements to apply style rules |
| Classes and Ids identify special style rules |
| CSS Border rules have three properties: Width, Color and Style |
CSS Comments uses the C programming language format
/* written comments*/
|
|
|