For writing documents, sometimes we need ordering serial as 1.1,1.2,1.3 etc
We can do this serial in html with the help of CSS.
Check this code below:
<!DOCTYPE html>
<html>
<body>
<style>
OL { counter-reset: item }
LI { display: inline }
LI:before { content: counters(item, ".") " "; counter-increment: item }
</style>
<ol start="1">Section
<li><ol start="1">
Section<li></li><br/>
Section<li></li><br/>
Section<li></li><br/>
</ol>
</li>
</ol>
</body>
</html>
Check the Output:
Output of about html code |
No comments:
Post a Comment