CSS list-style प्रॉपर्टी का उपयोग किसी एलिमेंट के लिए list-style-type, list-style-position और list-style-image निर्दिष्ट करने के लिए किया जाता है।
सिंटैक्स
CSS list-style प्रॉपर्टी का सिंटैक्स निम्नानुसार है:
Selector { list-style: /*value*/ }
उदाहरण
निम्नलिखित उदाहरण सूचियों की स्टाइलिंग को दर्शाते हैं:
<!DOCTYPE html> <html> <head> <style> body { font-size: 1.33em; background: linear-gradient(to right, orange, lightgreen, lightblue); } ol:first-of-type { box-shadow: inset 0 0 23px rgb(20,255,40); list-style: upper-alpha inside; } ul { list-style: circle; } </style> </head> <body> <ol> <li>Demo</li> </ol> <ol> <li>Demo</li> </ol> <ul> <li>demo</li> <ol> <li>demo</li> </ol> </ul> </body> </html>
आउटपुट
यह निम्नलिखित आउटपुट देता है:

दूसरा उदाहरण
<!DOCTYPE html> <html> <head> <style> ol { width: 40%; list-style: lower-roman; } li { border: thin solid hotpink; margin: 5px 30px; } </style> </head> <body> <h2>Popular Sports</h2> <ol> <li>Football</li> <li>Cricket</li> <li>Tennis</li> <li>Hockey</li> <li>Volleyball</li> <li>Basketball</li> </ol> </body> </html>
आउटपुट
यह निम्नलिखित आउटपुट देता है:
