CSS Flashcards
CSS Syntax
What are the names of the individual pieces of a CSS rule?
Declaration, selector, properties, values
CSS Syntax In CSS, how do you select elements by their class attribute?
Period symbol and name of class
CSS Syntax
In CSS, how do you select elements by their type?
Name of element
CSS Syntax
In CSS, how do you select an element by its id attribute?
The one specified after the pound or hash symbol(#) and name of id
CSS Colors
Name three different types of values you can use to specify colors in CSS.
RGB values, HEX codes, color names
CSS Box Model
What CSS properties make up the box model?
Width, height, border, margin, padding
CSS Box Model
Which CSS property pushes boxes away from each other?
Margin
CSS Box Model
Which CSS property add space between a box’s content and its border?
Padding
CSS Pseudo Classes
What is a pseudo-class?
A CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s). For example, :hover can be used to change a button’s color when the user’s pointer hovers over it.
CSS Pseudo Classes
What are CSS pseudo-classes useful for?
It helps users to interact and know if the object responded to users’ request. Change appearance of elements when a user interact with them.
CSS Fonts
Name two types of units that can be used to adjust font-size in CSS.
Pixels, percentages, ems
CSS Fonts
What CSS property controls the font used for the text inside an element?
Font-family
CSS Flexbox
What is the default flex-direction of a flex container?
Row
CSS Flexbox
What is the default flex-wrap of a flex container?
nowrap: all flex items will be on one line
CSS Layout
Why do two div elements “vertically stack” on one another by default?
Because div is a block-level element where it starts on a new line and has a full-width