style-attr-cascade-003.xht (924B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS: style attribute vs. tag selector</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/cascade/style/003.xml"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#cascading-order"/> 9 <link rel="help" href="http://www.w3.org/TR/css-style-attr/#interpret"/> 10 <link rel="match" href="reference/ref-green.html" /> 11 <style type="text/css"> 12 div { color: red; } 13 </style> 14 </head> 15 <body> 16 <!--It has a style attribute with "color: green" and a normal style rule with "color: red". --> 17 <div style="color: green">This should be green.</div> 18 19 </body> 20 </html>