CSS

From CSS Standards FAQ

Jump to: navigation, search

Cascading Style Sheets

CSS handles the presentation aspect of a document (Note: HTML is responsible for the structure of the document). Styles define how to display an HTML element...

Ways to apply a stylesheet to a document [gets applied in this order]:

   1 Browser/user default
   2 External
   3 Internal (inside the <head> tag)
   4 Inline (inside an HTML element) 

External:

<link rel="stylesheet" href="style.css" type="text/css" media="screen">

`style.css` contains:

body { font-family:"Times New Roman", Arial, sans-serif; }

and/or

<style type="text/css" media="all">@import "http://foo.bar/path/to/file/style.css";</style>

Internal:

<style type="text/css">
font-family:"Times New Roman", Arial, sans-serif; }
</style>

Inline:

<body style="font-family:'Times New Roman', Arial, sans-serif">

(note: single quotes around Times New Roman)

Personal tools