Section 6 - CSS Properties Flashcards

1
Q

What do you call the code that comes after the colon?

Ex:

html {
color: red
}

A

it’s called the value (red), what you want to set the property to

the property is first (color)

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

The way CSS rules work is that the first part is the ____

A

property

html {
background-color: red;
}

property is: background-color

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

If you’re not sure what a property does, what can you check?

A

the MDN docs

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

If you use the “color: blue” property and value, what does that do?

A

Changes the text color

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

What are named colors? Where can we find them? (2)

A
  1. All the colors we can use on our website (default CSS colors)
  2. We can find them by going Googling “MDN Docs named color”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are hex codes?

A

A different way of representing the larger number code for the color instead of just “red”

(hex codes are for colors that are blended RGB)

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

What does the “font-family” property do?

A

sets the font typeface you want to use

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

What does the “font-weight” property do?

A

Allows you to apply bold, underline, italics, etc.

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

How big is 1px?

A

1/96th of an inch
or
0.26 mm

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

Besides pixels, what’s another common way to represent font size with CSS properties? What is its abbreviation?

A

using a point “pt”

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

The point property is used by what?

A

many different applications (like Word)

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

When you’re using 12 points on your web page, what can you expect it to look like in comparison?

A

When you’re using 12 points on your webpage, you can expect that when the website is at 100%, it will look about the same as a 12 font on your Word document.

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

What are the 4 different ways to represent font size in CSS properties?

A
  1. px (pixels)
  2. pt (point)
  3. em (relative to parent)
  4. rem (relative to root)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is “em” definition?

A

defined as the full width of an “m” letter of the alphabet (since it’s one of the widest letters)

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

For font-size, how does “em” work?

A

You set a tag to have the “em” property (h4 for example), and if it has a parent it will inherit the size of the parent at a scale of the number in front of the “em”.

Example:
h3 font-size: 20px
{h4: 2em}
2 x (parent size, like 20px) = 40 px

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

What is “rem”? How does it work?

A

Works the same way as em except it’s relative to the root of your HTML file

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

What is the “root” of your HTML file?

A

Usually an <html> element that encloses everything inside (remember, from earlier lessons? The veggie burger layers?)

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

What method of changing the font size does she recommend using for web developers? Why? (2)

A

rem

(using em is too messy, rem is more consistent)

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

What type of font sizes are “pixel” and “point”?

A

static font sizes

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

What type of font sizes are “rem” and “em”?

A

relative font sizes

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

How do you use “rem” and “em” in code to set the font size?

A

rem {

font-size: 1rem;
}

font-size: 1em;
}

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

What is font-weight?

A

A property to change the font-weight: bold to make the text look heavier

(heavy -> weight -> bold)

h1 {
font-weight: bold
}

22
Q

What are 3 ways to change the font-weight?

A
  1. Basic keywords
  2. Relative to parent (lighter or bolder)
  3. Number (100 - 900) light -> bold
23
Q

What is “font-family”?

A

the (property) code we use that determines what you want your font to look like (typefaces)

(Values like: Helvetica, sans-serif, arial)

h1 {
font-family: Helvetica, sans-serif
}

24
With the font-family property, what is often done and is also a very important step?
You write the font name, then a comma and a backup generic font type (that's equivalent) in case the first font name isn't available on that OS h1 { font-family: Helvetica, sans-serif }
25
What's the difference between sans-serif and serif? (2)
sans-serif font type is basically all right angles serif has little feet/decorations
26
Helvetica is the same as.. ?
sans-serif (which is why it's used as a backup in the font-family)
27
Times New Roman is the same as...?
serif
28
What are the 2 main types of different typefaces?
sans-serif serif (Helvetica, Times New Roman)
29
How do you code a longer font name with spaces?
You add quotation marks around the font in order to tell the CSS file there's spaces in the name h3 { font-family: "Times New Roman", serif }
30
What's a way to insert a link into your file that will pull in a font from the internet for any user regardless of OS? (Step 1)
Use the embed code from fonts.google.com for example, insert it under the