CSS Type Selectors


Selector

CSS syntax consists of three parts: selector, property, and value

selector { property: value }
Example :
p {
   font-size: 12px; 
   color: #FF0000;
}

In this example, "p" is the selector (type selector), "font-size" is the attribute, "12px" is the value.


Type Selector

The type selector is based on the html element type as the selection criteria.

In the page element, you can distinguish by type, which can be used as CSS selectors, such as "<a></a>", "<ul></ul>", "<div></div>"And so on, the corresponding selectors are "a", "ul", "div".

a {
    text-decoration: none;
}

This example indicates that all hyperlinks on the page are not underlined.




Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook