Prelims - Fonts Flashcards

1
Q

fonts have a small stroke at the edges of each letter. They create a sense of formality and elegance.

A

Serif

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

fonts have clean lines (no small strokes attached). They create a modern and minimalistic look.

A

Sans-serif

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

fonts here all the letters have the same fixed width. They create a mechanical look

A

Monospace

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

fonts imitate human handwriting

A

Cursive

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

fonts are decorative/playful fonts

A

Fantasy

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

property should hold several font names as a “fallback” system, to ensure maximum compatibility between browsers/operating systems

A

font-family

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

property is mostly used to specify italic text.

A

font-style

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

The font-style property is mostly used to specify italic text.

This property has three values:

A

normal - The text is shown normally
italic - The text is shown in italics
oblique - The text is “leaning” (oblique is very similar to italic, but less supported)

p.normal {
  font-style: normal;
}

p.italic {
  font-style: italic;
}

p.oblique {
  font-style: oblique;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

property specifies the weight of a font:

A

font-weight

p.normal {
  font-weight: normal;
}

p.thick {
  font-weight: bold;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

property specifies whether or not a text should be displayed in a small-caps font

A

font-variant

p.normal {
  font-variant: normal;
}

p.small {
  font-variant: small-caps;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

property sets the size of the text.

A

font-size

h1 {
  font-size: 40px;
}

h2 {
  font-size: 30px;
}

p {
  font-size: 14px;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The font-size value can be

A

absolute or relative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • Sets the text to a specified size
  • Does not allow a user to change the text size in all browsers (bad for accessibility reasons)
  • is useful when the physical size of the output is known
A

Absolute size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • Sets the size relative to surrounding elements
  • Allows a user to change the text size in browsers
A

Relative size

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

To allow users to resize the text (in the browser menu), many developers use this instead of pixels

A

Em

1em is equal to the current font size. The default text size in browsers is 16px. So, the default size of 1em is 16px

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

The size can be calculated from pixels to em using this formula:

A

pixels/16=em

h1 {
  font-size: 2.5em; /* 40px/16=2.5em */
}

h2 {
  font-size: 1.875em; /* 30px/16=1.875em */
}

p {
  font-size: 0.875em; /* 14px/16=0.875em */
}
17
Q

The text size can be set with a vw unit, which means the

A

viewport width

18
Q

That way the text size will follow the size of the browser window

A

vw or viewport width

<h1 style="font-size:10vw">Hello World</h1>
19
Q

The font property is a shorthand property for:

A

font-style
font-variant
font-weight
font-size/line-height
font-family

p.a {
  font: 20px Arial, sans-serif;
}

p.b {
  font: italic small-caps bold 12px/30px Georgia, serif;
}