CSS हमें बैकग्राउंड, लिस्ट-स्टाइल प्रॉपर्टीज, फॉन्ट स्टाइल आदि निर्दिष्ट करके लिस्ट को स्टाइल करने की अनुमति देता है। लिस्ट-स्टाइल प्रॉपर्टी लिस्ट-स्टाइल-टाइप, लिस्ट-स्टाइल को निर्दिष्ट करने के लिए शॉर्टहैंड है। -छवि, और सूची-शैली-स्थिति एक ही क्रम में।
सिंटैक्स
CSS लिस्ट-स्टाइल प्रॉपर्टी का सिंटैक्स इस प्रकार है -
Selector {
list-style: /*value*/
} उदाहरण
निम्नलिखित उदाहरण सूचियों की शैली को स्पष्ट करते हैं -
<!DOCTYPE html>
<html>
<head>
<style>
ul {
display: flex;
float: left;
list-style-image: url("https://www.tutorialspoint.com/images/reactjs.png");
background: lightseagreen;
list-style-position: inside;
}
li {
background: azure;
margin: 5px 20px;
}
</style>
</head>
<body>
<h3>ReactJS</h3>
<ul>
<li>Lesson 1</li>
<li>Lesson 2</li>
<li>Lesson 3</li>
<li>Lesson 4</li>
<li>Lesson 5</li>
</ul>
</body>
</html> आउटपुट
यह निम्न आउटपुट देता है-

उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
ol {
width: 40%;
color: white;
list-style: lower-greek inside;
background-image: url("https://www.tutorialspoint.com/ethereum/images/ethereum-mini-logo.jpg");
}
li {
background-color: rgba(0,0,0,0.6);
margin: 5px 30px;
}
</style>
</head>
<body>
<h2>Ethereum</h2>
<ol>
<li>Smart Contracts</li>
<li>Ganache</li>
<li>Creating Wallet </li>
<li>Deploying Contract</li>
</ol>
</body>
</html> आउटपुट
यह निम्न आउटपुट देता है -
