CSS Priority

, , …,
Want to master JavaScript in a month? Commit. Buy Xah JavaScript Tutorial. You also get Xah HTML Tutorial and Xah CSS Tutorial.

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

Sample testing template:

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

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

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


test here: test: html multiple classes and css.

blog comments powered by Disqus