Cascading


Linked stylesheets
  • Create aseparate stylesheet file (.css suffix):

    <html> <style type="text/css"> <!-- mystyle.css -- >
    <!-- body {font: 10pt };               p {color: black;
                  margin-left: 0.5in; margin-top: -10px } --> </style> </html>

  • Apply it to an HTML page:

    <head> <link rel=stylesheet href="mystyle.css" type="text/css">

Cascading stylesheets
Which stylesheet definition takes precedence?

Basic rule: the most specific setting wins.

"! important" statement overrides normal rules