What element of the page must be styled?
What part of that element must be styled?
How do you want that part of the selected element to look?
The answers to these questions are given by selectors, properties, and values.
Selectors
Used to select or point to one or more specific elements within your page.
The selector answers the first question: What element of the page must be styled?
Types OF CSS Selector:
1-The Universal Selector
Indicated by an asterisk (*), applies to all elements in your page.
The Universal selector can be used to set global settings like a font family.
*
{
font-family: Arial;
}
2-The Type Selector
Point to an HTML element of a specific type.
h1
{
color: Green;
}
This Type selector now applies to all
0 comments:
Post a Comment