Getting to Know CSS Flashcards
What does CSS allow us to do?
It allows us to add layout and design to our pages, and it allows us to share those styles from element to element and page to page.
A _______designates exactly which element or elements within our HTML to target and apply styles (such as color, size, and position) to.
selector
Ex: p { … }
Once an element is selected, a ______ determines the styles that will be applied to that element. __________ names fall after a selector, within the curly brackets, {}, and immediately preceding a colon, :.
Property.
Ex:
p {
color: …;
font-size: …;
}
________ can be identified as the text between the colon, :, and semicolon, ;
Values
Ex:
p {
color: orange;
font-size: 16px;
}
_______ selectors target elements by their element _______. For example, should we wish to target all division elements, <div>, we would use a ______ selector of div.
Type.
_______selectors allow us to select an element based on the element’s _____ attribute value.
Class.
*Within CSS, classes are denoted by a leading period.
.awesome { … }
*Within HTML,
<div>...</div>
<p>...</p>
_______ selectors are even more precise than class selectors, as they target only one unique element at a time. Just as class selectors use an element’s class attribute value as the selector, _____ selectors use an element’s ______ attribute value as a selector.
ID
*Within CSS, ID selectors are denoted by a leading hash sign, #, followed by the id attribute value.
#shayhowe { … }
*Wintin HTML,
<div>...</div>