CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Selector, declaration block, -> property, value
In CSS, how do you select elements by their class attribute?
dot (.)
In CSS, how do you select elements by their tag name?
name of the element (element selector)
In CSS, how do you select an element by its id attribute?
pound/hashtag (#)
Name three different types of values you can use to specify colors in CSS.
RGB, Hex, Color names, Hue, Saturation (Amount of gray in a color), Brightness (How much black is in a color).
What CSS properties make up the box model?
Border, Margin, and 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?
Its a keyword added to a selector
What are CSS pseudo-classes useful for?
It allows the users to have a better interaction/engagement with the browser.
Better functionality
Name two types of units that can be used to adjust font-size in CSS.
px, percentages, rem (changes the width of the letter m)
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?
Row
What is the default flex-wrap of a flex container?
No wrap (nowrap)
What is the default value for the position property of HTML elements?
Static