more notes Flashcards

1
Q

how to change the spacing between lines

A

line - height

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what does object-fit do

A

we use it if the height and width of the image doesn’t match its dimensions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is <div>

A

division, or just a box
- is a block element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

why is a div

A

can contain any other elements inside of divs - eg paras, images etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

block elements in divs

A

they take up the entire line IN THEIR CONTAINER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

if we set the width to 100%, what does that mean

A

the element takes up 100% of its container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how to do inline styles (target css in a line rather than in a paragraph)

A
  • <style = “write css here”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a grid

A

a layout that has rows and columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to make a grid

A

make a div
set the divs display to grid
set the grid-template-columns num,num,num

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does 1fr mean in a grid

A

that specific part of the grid will take up the remaining free space of the page
- the 1 is a ratio, if it was 2, it would be double the size of the first div

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how to add space under a grid

A

add padding inside the body element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how to make a grid with equal spacing between the boxes

A

use 1fr 1fr 1fr
- set the column-gap and row-gap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how to create a flex box

A

set display : flex;
set the flex-direction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

how to get a box to take up remaining space on the page using flex box

A

use flex:1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

how to change where contents of a flexbox start

A

justify-content : start / end / center

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how to spread the contents of a flexbox evenly

A

justify-content : space-between

17
Q
A
18
Q

how to set a maximum width

A

max-width :

19
Q

sizing of headers

A

<h1> — used for main headings. All other smaller headings are used for subheadings.
<h2>
<h3>
<h4>
<h5>
<h6>
</h6></h5></h4></h3></h2></h1>