CSS Flashcards
- What are the names of the individual pieces of a CSS rule?
a rule set consists of a selector, the declaration, and inside the declaration goes the property and the given value
In CSS, how do you select elements by theirclassattribute?
.class
- In CSS, how do you select elements by their type?
state the element type
- In CSS, how do you select an element by itsidattribute?
id
Name three different types of values you can use to specify colors in CSS.
RGB, Hex Code, Color
- What CSS properties make up the box model?
margin, padding, border, width, height
- Which CSS property pushes boxes away from each other?
margin
- Which CSS property add space between a box’s content and its border?
padding
- What is a pseudo-class?
is a kind of class that is executed by the browser when an action is performed, hovered, submit, click, etc
- What are CSS pseudo-classes useful for?
they are useful when trying to change the appearance of elements when user interacts with them
- Name two types of units that can be used to adjustfont-sizein CSS.
pixels, percentage, or rem
- What CSS property controls the font used for the text inside an element?
font-family
- What is the defaultflex-directionof aflexcontainer?
row, left to right
- What is the defaultflex-wrapof aflexcontainer?
all on one line AKA nowrap
- Why do two div elements “vertically stack” on one another by default?
because div elements are block elements so they take up all available space