>> English << | Português | По-русскиenternetusers > Tutorials > Surfing tutorial
>> Example 10 << | Prev | Next | Contents

Description


If the name of class is not preceeded by element name, than all relevant element are set. The definition with a class with element name has precedence before another one without it.

>> Case 1 <<
HTML SourceSurfing stylesheet

<div> div: 000 </div>
<div class = "aaa"> div: aaa </div>
<div class = "bbb"> div: bbb </div>
<div class = "ccc"> div: ccc </div>
<p> p: 000 </p>
<p class = "aaa"> p: aaa </p>
<p class = "bbb"> p: bbb </p>
<p class = "ccc"> p: ccc </p>
body {background-color: white;  color: black}

.aaa {color: red}

p.aaa {color: green}
div.ccc {color: navy; background-color: aqua}

.bbb {background-color: maroon; color:yellow}
.ccc {color:blue}

Browser output