Week 1 Flashcards
Name two types of units that can be used to adjust font-size in CSS.
pixels, px and rem/em, and percentages, % (do not use percentage)
What CSS property controls the font used for the text inside an element?
font-family, e.g. body {font-family: sans-serif}
What CSS properties make up the box model?
content, padding, margin,border
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 the default flex-direction of a flex container?
row (horizontally), left to right
What is the default flex-wrap of a flex container?
nowrap (none)
Why do two div elements “vertically stack” on one another by default?
they are by default block level, i.e. display: block
What is the default flex-direction of an element with display: flex?
horizontal, left to right
What are the three primary components of a page layout? (Which helper classes do you need?)
row, column, container
What is the minimum number of columns that you should put in a row?
one
What is the purpose of a container?
to encase things so you can flexbox?
What is the default value for the position property of HTML elements?
static
How does setting position: relative on an element affect document flow?
It doesn’t but items inside will move if removed from doc flow?
How does setting position: relative on an element affect where it appears on the page?
How does setting position: absolute on an element affect where it appears on the page?
How do you constrain an absolutely positioned element to a containing block?
What are the four box offset properties?
left, right, bottom, top
how do you overlay items on top of each other?
you can adjust ordering using “z-index”
Why do we log things to the console?
to make sure your code is working!
What is a method?
A method is a function which is a property of an object. There are two kinds of methods: instance methods which are built-in tasks performed by an object instance, or static methods which are tasks that are called directly on an object constructor.
How is a method different from any other function?
it is a property of an object
How do you remove the last element from an array?
pop() method