CSS Priority

, , …,
Want to master JavaScript in a week? Example based, to the point. Xah JavaScript Tutorial.

CSS priority is slightly complex. Here's a the priority order basics:

Sample testing template:

<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
.bk1 {color:blue}
.bk2 {color:red}
</style>
<title>test: html multiple classes and css</title>
</head>
<body>

<h1>test: html multiple classes and css</h1>

<p class="bk1 bk2">Something</p>

</body>
</html>

test here: test: html multiple classes and css.

blog comments powered by Disqus