Приглашаем посетить
Хемницер (hemnitser.lit-info.ru)

Type Selectors

Previous Page
Table of Contents
Next Page

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;
}


Previous Page
Table of Contents
Next Page