CSS Tutorial

CSS Style

CSS Layout Style

CSS Float Style

CSS Reference

CSS counter-reset property




The counter-reset property reset one or more counter values.


Property Values


Properties Value Description
Syntax counter-reset: identifier integer;
value   increment value
  none
  inherit
Allow to All Elements
Inherited No

Example-Code:

<html>
<head>
<style type="text/css">
body {counter-reset:section;}
h1 {counter-reset:subsection;}
h1:before
{
counter-increment:section;
content:"Section " counter(section) ". ";
}
h2:before 
{
counter-increment:subsection;
content:counter(section) "." counter(subsection) " ";
}
</style>
</head>
<body>
<h1>HTML</h1>
<h2>HTML Tags</h2>
<h2>HTML Example<h2>
<h2>HTML Cheet Sheet</h2>

<h1>CSS</h1>
<h2>CSS tutorial</h2>
<h2>CSS Property</h2>

</body>
</html>
Online Try This Code Your Self....   »