सूची-शैली-प्रकार, सूची-शैली-छवि और सूची-शैली-स्थिति के साथ सीएसएस गुणों द्वारा अनियंत्रित और आदेशित सूचियों की शैली और स्थिति को स्वरूपित किया जा सकता है।
सिंटैक्स
CSS लिस्ट-स्टाइल प्रॉपर्टी का सिंटैक्स इस प्रकार है -
Selector {
list-style: /*value*/
} उदाहरण
निम्नलिखित उदाहरण CSS सूची-शैली की संपत्ति को दर्शाते हैं -
निम्नलिखित उदाहरण शैलियों ने सूची का आदेश दिया -
<!DOCTYPE html>
<html>
<head>
<style>
ol {
list-style: upper-roman;
line-height: 150%;
}
</style>
</head>
<body>
<h2>Latest C# Versions</h2>
<ol>
<li>C# 8.0</li>
<li>C# 7.3</li>
<li>C# 7.2</li>
<li>C# 7.1</li>
<li>C# 7.0</li>
</ol>
</body>
</html> आउटपुट
यह निम्न आउटपुट देता है -

उदाहरण
निम्नलिखित उदाहरण शैली अनियंत्रित सूची -
<!DOCTYPE html>
<html>
<head>
<style>
ul > ul{
list-style: circle inside;
}
li:last-child {
list-style-type: square;
}
</style>
</head>
<body>
<h2>Programming Languages</h2>
<ul>
<li>C++ programming language created by Bjarne Stroustrup as an extension of the C programming language.</li>
<li>Java programming language developed by James Gosling.</li>
<ul>
<li>Core Java</li>
<li>Advanced Java</li>
</ul>
<li>Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way.</li>
</ul>
</body>
</html> आउटपुट
यह निम्न आउटपुट देता है -
