CSS Flashcards
(39 cards)
What are the names of the individual pieces of a CSS rule?
declaration block, selector, properties, values
In CSS, how do you select elements by their class attribute?
.attribute { (putting a period before the name of the class)
In CSS, how do you select elements by their tag name?
type { (type element name)
In CSS, how do you select an element by its id attribute?
id { (type # with id)
Name three different types of values you can use to specify colors in CSS.
RGB Values
Hex Codes
Color Names
What CSS properties make up the box model?
Border, Margin, Padding, Width, Height
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?
class added to a selector that specifies a special state (ex: hover)
What are CSS pseudo-classes useful for?
Let you apply a style to an element for events of users interacting with elements
Name two types of units that can be used to adjust font-size in CSS.
px, rem, em
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 :left to right
What is the default flex-wrap of a flex container?
no wrap
What is align items in flexbox
top to bottom alignment
Why do two div elements “vertically stack” on one another by default?
divs are block elements
What is the default flex-direction of an element with display: flex?
Row: left to right
What are the three primary components of a page layout? (Which helper classes do you need?)
Container, Row, Column
What is the minimum number of columns that you should put in a row?
1 column
What is the purpose of a container?
the purpose of the container is to be able organize the rows and container in a readable manner.
What is the purpose of a row?
Row is used to show content of a vertical chunk within a container.
What is the purpose of a column?
Represents the chunk of a page section in a horizontal view.
What is the default value for the position property of HTML elements?
position:static
How does setting position: relative on an element affect document flow?
Doesn’t affect document flow.