HTML5 (Part 9) New selectors:

A CSS selector refers to the manner in which HTML element(s) are styled using a stylesheet. For example, to put a border around all <div> elements you would use the selector div:
         div { border: 1px solid #000; }.

To apply a background color to all elements with the class highlight you would use the selector .highlight:
        .highlight { background-color: yellow; }.


 Finally, to change the width of an element with an ID attribute value of myDiv, you would use:
                #myDiv { width: 250px; }.
Of
course, these selectors can be combined, so to select all <div> elements with the class highlight, you would use div.highlight, or to select the <div> element with the ID myDiv you would use
                div#myDiv.
In addition to these straightforward selectors, CSS also includes (and has done since previous versions) a series of more complex selectors. For example you can use the selector
                input[type="text"] to select only the input elements that contain an attribute type with the value of text. Or you can use the pseudo-class :hover to style anelement when the mouse is over it, for example:
                a:hover { color:red; }.
There are many more of these selectors, all of which are provided to make it easier to select an element to style. With CSS3, even more new selectors have been added to the mix, all of which make developers' lives easier and reduce the amount of HTML and JavaScript they need to write.