CSS Flashcards
CSS Syntax:
What are the names of the individual pieces of a CSS rule?
a selector and a declaration
(a declaration is made up of a property and property value)
CSS Syntax:
In CSS, how do you select elements by their class attribute?
.nameOfClassAttribute
CSS Syntax:
In CSS, how do you select elements by their tag name?
just their name
CSS Syntax:
In CSS, how do you select an element by its id attribute?
(pound)nameOfIdAttribute
CSS Colors:
Name three different types of values you can use to specify colors in CSS
rgb values, hex code, color names
CSS Box Model:
What CSS properties make up the box model?
margin, border, padding, and content (height/width)
CSS Box Model:
What 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 Class:
What is a pseudo-class?
a pseudo class is a keyword added to a selector that specifies a special state of the selected elements (pseudo classes are under the browser’s control)
CSS Pseudo Class:
What are CSS pseudo-classes useful for?
pseudo classes let you apply style to an element, makes it easier
CSS Fonts:
Name two types of units that can be used to adjust font-size in CSS
pixels, 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?
left to right
CSS Flexbox:
What is the default flexwrap of a flex container?
nowrap, all on one line
CSS Layout Classes:
Why do two div elements “vertically stack” on one another by default?
They vertically stack because they are block elements