CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector {declaration} declaration = (property:) (value)
In CSS, how do you select elements by their class attribute?
using the .class selector
In CSS, how do you select elements by their tag name?
just using the tag type
In CSS, how do you select an element by its id attribute?
using the #id selector
What CSS properties make up the box model?
margin, padding, border, height, width
Which CSS property pushes boxes away from each other?
Margin
Which CSS property add space between a box’s content and its border?
padding
Name three different types of values you can use to specify colors in CSS.
rgba, rgb, hexcode, color
What is a pseudo-class?
Class that comes from a special state. under the browser’s control. You can prepare for them but not control them.
What are CSS pseudo-classes useful for?
they make things easier as they allow interaction with the user.
What is the default flex-direction of a flex container?
row
What is the default flex-wrap of a flex container?
no wrap.
Why do two div elements “vertically stack” on one another by default?
div elements are block elements and take up the entire row
What is the default flex-direction of an element with display: flex?
row
What are the three primary components of a page layout? (Which helper classes do you need?)
container, column, row
What is the minimum number of columns that you should put in a row?
1
What is the purpose of a container?
boundary of content
What is the default value for the position property of HTML elements?
static