CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Selector → the element ex: p {} and a declaration: contain a property and a value ex: font-family:Arial;
In CSS, how do you select elements by their class attribute?
.element
In CSS, how do you select elements by their type?
Just the name if the element retrieved
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.
Hex code, rgb function,name color
What CSS properties make up the box model?
Border, margins, padding
Which CSS property pushes boxes away from each other?
Margin
Which CSS property adds space between a box’s content and its border?
padding property
What is a pseudo-class?
Classes that are applied based on a certain state or anything that is happening, that is put by the browser.
Name at least two units of type size in CSS.
Erm and em
What CSS property controls the font used for the text inside an element?
font-family
What is the default flex-direction of a flex container?
Horizontal in a 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?
Block elements
What is the default value for the position property of HTML elements?
Static, no behavior -> normal document flow