>> English << | Português | По-русскиZVON > Tutorials > CSS tutorial
>> Example 7 << | Prev | Next | Contents

Description

So far our stylesheets contained just one definition for each element. But it is not a rule, the number of definitions is not restricted. Semicolons ";" between individual properties we have used in previous examples are just shortcuts to this full listing.

>> Case 1 << | Case 2
HTML SourceCSS stylesheet

<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<p>Text</p>
body {background-color: white;  color: black}

h1{color: red}
h1{background-color: yellow}

h2{color:navy; background-color: aqua}

Browser output