CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector, declaration, property, value
In CSS, how do you select elements by theirclassattribute?
put a dot in front of value of class attribute and curly brackets
In CSS, how do you select elements by their type?
just the name and curly brackets
In CSS, how do you select an element by itsidattribute?
put a # in front of value id attribute and curly brackets
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
Which CSS property add space between a box’s content and its border?
padding
What is a pseudo-class?
Class that is applied to an element by the browser under specific circumstances.
What are CSS pseudo-classes useful for?
Adding functionality to certain elements based on user interaction. Applying styling based on user actions.
Name at least two units of type size in CSS.
pixels, percentages, ems, pt
What CSS property controls the font used for the text inside an element?
font-family property.
What is the default flex-direction of a flex container?
The defaultflex-directionof aflexcontainer isrow. The flex-direction CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
What is the default flex-wrap of a flex container?
no wrap. The flex-wrap CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines.
Why do two div elements “vertically stack” on one another by default?
div elements are by default block-level elements.