CSS: Multiple rules within one style section

This entry is part 4 of 26 in the series Basic CSS

We can define multiple rules for multiple tags.

Using list style types defined in this post, we can expand this to also specify ordered lists.

<!DOCTYPE html>
<html>
<head lang='en'>
        
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Lists</title>
    <style type='text/css'>
        ol {
            list-style-type: lower-alpha;
        }

        ul {
            list-style-type: square;
        }</style>
</head>
<body>
<h4>British Pop</h4>
<ol>     
    <li>Cold Play</li>
        
    <li>Depeche Mode</li>
        
    <li>Adele</li>
</ol>
 
<h4>American Rock</h4>
<ul>
    <li>Linkin Park</li>
        
    <li>Nirvana</li>
        
    <li>Metalica</li>
</ul>
 
</body>
</html>

Series Navigation<< CSS: Applying global style rule to all similar <ul> tags
CSS: Single and multiple rules >>

Leave a comment

Leave a Reply