CSS Flashcards
What are the names of the individual pieces of a CSS rule?
CSS rule set consists of:
A selector & declaration.
Inside declaration is a property & value.
In CSS, how do you select elements with theirclassattribute?
Period & class value.
In CSS, how do you select elements by their type?
Just simply write their element name.
In CSS, how do you select an element with itsidattribute?
Hashtag & id name.
Name three different types of values you can use to specify colors in CSS.
HEX codes, writing out the color names, & the RGB value.
What CSS properties make up the box model?
Height & Width (from the content), padding, border, & margin.
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?
A pseudo-class isa class applied by the browser that selects elements that are in a specific state.
What are CSS pseudo-classes useful for?
Styling links, & responding to users by highlighting their current position.
Name two types of units that can be used to adjustfont-sizein CSS.
Pixel, em, rem & percent.
What CSS property controls the font used for the text inside an element?
Font-family property.
What is the defaultflex-directionof aflexcontainer?
Left to right (row).
What is the defaultflex-wrapof aflexcontainer?
No wrap.
Why do two div elements “vertically stack” on one another by default?
Because they are block elements, by default.