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?
Hash tag (#) 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 adds 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).
CSS Pseudo Classes
What are CSS pseudo-classes useful for?
It helps users to interact and know if the object responded to users’ request.
CSS Fonts
Name two types of units that can be used to adjust font-size in CSS.
pixels, ems, percentages, points, inch, rem
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
CSS Layout Classes
Why do two div elements “vertically stack” on one another by default?
div starts on a new line and has a full-width.