Skip to main content

Close
Get the best research tool on the web today,and free!
Connect with people with common interests!

All Annotations of [Preview]

saved by26 people, first byPat keeney on 2006-03-02, last byHelen Blanchett on 2008-08-09

  • World Wide Web Consortium (W3C)
  • Styles are normally saved in
    external .css files
  • highest priority:



    1. Browser default

    2. External style sheet

    3. Internal style sheet (inside the <head> tag)

    4. Inline style (inside an HTML element)
  • inline style (inside an HTML element) has the highest priority
  • What is CSS?




    • CSS stands for Cascading Style Sheets

    • Styles define how to display HTML elements

    • Styles are normally stored in Style Sheets

    • Styles were added to HTML 4.0 to solve a problem

    • External Style Sheets can save you a lot of work

    • External Style Sheets are stored in CSS files

    • Multiple style definitions will cascade into one
  • Cascading Order



    What style will be used when there is more than one style specified for
    an HTML element?




    Generally speaking we can say that all the styles will "cascade" into
    a new "virtual" style sheet by the following rules, where number four
    has the highest priority:



    1. Browser default

    2. External style sheet

    3. Internal style sheet (inside the <head> tag)

    4. Inline style (inside an HTML element)


    So, an inline style (inside an HTML element) has the highest priority, which
    means that it will override a style declared inside the <head> tag, in
    an external style sheet, or in a browser (a default value).