CSS properties:

How to use Cascading Style Sheets see enetopia.com/jscript/index.htm#css

For a basic list of Style properties available see enetopia.com/jscript/css/glossary.htm


* all elements, whatever their name or content
Any html tag
  • can use all the attributes listed
  • Example:
    • table {width="100%" border="10"}
    #ID
  • value selects the element that has an attribute of type ID with that IDvalue
  • Example:
    • On html page
      <table ID="newbook">....</table>
      On CSS page
      table#newbook {background-color: red}
    Make up your own tags
  • can use all the attributes listed
  • Example:
    • sales {margin-bottom="10%" border="10"}
  • elementName selects every element whose name is elementName
  • element1 element2 (space inbetween them) selects all elements named element2 that are descended from element1
  • element1, element2 selects all elements named element1 and element2
  • element1>element2 selects element2 that are direct children of element1
  • element1+element2 selects element2 that directly follows element1, but are siblings
  • [attrName] selects elements that specify a value for that attrName
  • [attrName="value"] selects the elements that have that attribute, with that attribute's value
  • [attrName~="value"] selects that value if it is listed anywhere for that element
  • .classname
  • selects elements that have that .classname
  • Example:
    • On html page
      <div class="style1"></div>
      On CSS page
      div.style1 {font-family: broadway}

    a
    :link { font-weight: bold }
    :visited
    :active
    :hover
    :focus
    * { whitespace: pre } tells our document that all whitespace should be preserved
    xml:lang see Processing Instructions