CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector
opening curly brace for declaration block
property: value;
ending curly brace of the css rule
In CSS, how do you select elements by their class attribute?
.class-name {
In CSS, how do you select elements by their type?
element name
In CSS, how do you select an element by its id attribute?
id-name {
Name three different types of values you can use to specify colors in CSS.
RGB values, Hex codes, Color names
What CSS properties make up the box model?
Border Margin Padding
Which CSS property pushes boxes away from each other?
Margin - sits on the outside of the border
Which CSS property add space between a box’s content and its border?
padding -Is the space between the border of a box and any content.
What is the box model
Box model uses border margin padding to decide the size of a single box
Size of box is calculated with what (width)
width + padding-left + padding-right + border-left + border-right
Size of box is calculated with what (height)
height + padding-top+ padding- bottom + border-top + border bottom
What is a pseudo-class?
class applied by the browser in certain situations.
Name 3 pseudo-classes
hover, active, focus
What are CSS pseudo-classes useful for?
More interactive webpage
Name at least two units of type size in CSS.
pixels, percentages, ems