Research and Define CSS Terms
-
Specificity:
Specificity is what is used to determine which CSS rule while be applied to an elements or elements in the event that there is
conflicting CSS rules applied to the same element or elements. The way it is decided which rule is applied is by picking the rule
that has the largest point value or most importance. The hierachy of these selectors going from highest to lowest is: Inline rules, id's,
classes attributes and pseudo classes, and last is plain element rules.
-
Precedence:
Precedence is an offshoot of specificity and as the name suggests it determines which rule has precedence over another rule to be applied
to an element or elements by choosing the one of that is closest to the element and applying it given that this one also has the highest
point value as well.
-
Inheritance:
Inheritance also means what it sounds like, it describes how a child element inherits css applied to its parent element accept when there
are rules applied to the child element itself.
-
Property:
A property is a characteristic in a CSS rule that helps the browser know how to display a certain element. An example of a property would be
background-color: since its value would help tell the broswer how to display an element.
-
Value:
A value is what makes a CSS property work and tells the browser the specific thing a property needs to change about an element. An example
of a value would be a color like red, or a a font-weight like bold since they tell the
browser how to change a certain element.
-
Selector:
A selector is the beginning of a CSS rule and tells the browser to select a certain element to change. In the following CSS example rule the
bold part is the selector:
h2 {
background-color:yellow;
color: black;
}