Introduction to Cascading Style Sheets
Extra Credit

Notes from CSS class...
Week Three

    Syntax for a inline style sheet:
    Inline style rule resides inside the opening tag of the selector it will modify.
  • <selector style="property: value;">your text</selector>
    Selector are tags such as BODY, P, UL, H1, TABLE, LI, IMG, TD, SPAN, A, etc.
  • The style declaration closest to the selector will override all other style declarations. Inline style declarations will override embedded style, which overrides the external style sheet.
  • SPAN tags are nested within another set of container tags.
    <H1>A Day at the <span class="any"> Beach</span></H1>
  • DIV tags usually nest one or more sets of container tags:
    <div class="any"><h1>Title</H1> <P>Copy</P></div>
  • Set up CLASS rules in the external or embedded style sheet.
    .anyname {property: value;}
  • Apply CLASS rules inline:
    <p class="anyname">copy</p>
    <span class="anyname">copy</span>
    <div class="anyname">copy</div>
  • CLASS rules can be applied to any container tag or block level element.
  • FLOAT values are left, right and none.
  • CLEAR defines whether an element will allow other elements to float along its sides. It is used with FLOAT or ALIGN to position elements relative to each other.
  • Use length measurements to create static borders.
  • Use percentages to create borders that resize with the browser window.
  • Padding is added inside the element.
  • Margin is added outside the element.
  • Border style, color, and width can vary from one side of an element to another.
  • An element can float to the left or right of the page body.
  • Clear can control where text appears in relation to an image.
Hosted by www.Geocities.ws

1