Type Selectors


Type selectors will select any HTML element on a page that matches the selector.

In the HTML sample shown in Listing 3.1, there are seven HTML elements that could be used as type selectors, including <body>, <div>, <h1>, <p>, <ul>, <li>, and <a>.

For example, to select all <li> elements on the page, the <li> selector is used as shown in Listing 3.2.

Listing 3.2. CSS Code Containing Styling for the <li> Element
li {     color: blue; } 




Sams Teach Yourself CSS in 10 Minutes
Sams Teach Yourself CSS in 10 Minutes
ISBN: 0672327457
EAN: 2147483647
Year: 2005
Pages: 234
Authors: Russ Weakley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net