CSS3 Selectors: Introduction

This entry is part 1 of 40 in the series CSS3 Selectors

CSS (Cascading Style Sheets) is a language for describing the rendering of HTML elements allowing style to be formatted in the page.

CSS uses Selectors for binding style properties to elements in the document.

In the example below, we have use the <ul> element to format an unordered list.

In the <style> section, with the ul selector, we can define the style of the list to useĀ list-style-type: square

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Lists</title>

    <style type='text/css'>
        ul {
            list-style-type: square;
        }
    </style>

</head>
<body>

<h4>American Rock</h4>
<ul>
    <li>Linkin Park</li>
    <li>Nirvana</li>
    <li>Metalica</li>
</ul>

</body>
</html>
Series Navigation
CSS3 Selectors: Type selector >>