Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

CSS type selectors

CSS type selectors

With css type selectors we can target any HTML elements in a document. For example, we can give a default background colour to the body tag or set a global color, font size etc. to all paragraph tags.

body {
   background-color: #ffffff;
}

or

p {
   color: #ccc;
   font-size: 16px;
}

Type selectors are the lowest, regarding specificity. It means that values set here, will be overridden once a type selector is added to a class or ID. Also it’s best to avoid setting default styles to generic tags such as divs.

Leave a reply