Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-style-attr/style-attr-cascade-003.xht - WPT Dashboard Interop Dashboard
<head>
<title>CSS: style attribute vs. tag selector</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
<link rel="match" href="reference/ref-green.html" />
<style type="text/css">
div { color: red; }
</style>
</head>
<body>
<!--It has a style attribute with "color: green" and a normal style rule with "color: red". -->
<div style="color: green">This should be green.</div>
</body>
</html>