Cascading Style Sheets
<head> <style type="text/css"> h1 {color:gray;} </style></head> <body> <h1>Its a wonderful day for <em>science!</em></h1> </body>the word "science" would be in gray.
id
dominates class
which
dominates all others, for example:
<head> <style type="text/css"> .blue {color:blue;} h1 {color:red;} </style></head> <body> <h1 class="blue">This is blue</h1></body>
<head> <style type="text/css"> .green {color: green} a {color: yellow;} h1 {color: red;} h1 {color: blue;} </style> </head> <body> <h1>This is blue <a href="/">this is yellow</a></h1> <h1 class="green">This is green</h1> </body>
5 of 14