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
You must be logged in to post a comment.