tagName#id: use id name plus tag name to mark a style
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
h2#warning {
background: red;
}
h2#questions {
background: pink;
}
h2#comment {
background: yellow;
}
h2#document {
background: purple;
}
h2#print {
background: gold;
}
h2#search {
background: gray;
}
</style>
</head>
<body>
<h2 id="warning">warning</h2>
<h2 id="questions">question</h2>
<h2 id="comment">comment</h2>
<h2 id="document">document</h2>
<h2 id="print">print</h2>
<h2 id="search">search</h2>
<p>this is a text.</p>
</body>
</html>
Related examples in the same category