Comments - Font-Weight Flashcards

1
Q

CSS Comments

A
A CSS comment look like this:/* Comment goes here */
Example:
p { 
color: green; 
/* This is a comment */
font-size: 150%;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Three main sources of style information to form a cascade

A
  • The stylesheet created by theauthor of the page
  • Thebrowser’s default styles
  • Styles specifiedby the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Inheritance

A

Inheritance refers to the way properties flow through the page. A child element will usually take on the characteristics of the parent element unless otherwise defined.

For example:

body {
color: green;
font-family: Arial;
}

<p>
This is a text inside the paragraph.
</p>

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

Properties: font-family

A

The font-family property specifies the font for an element.

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

Two types of font family names

A
  • font family: a specific font family (like Times New Roman or Arial)
  • generic family: a group of font families with a similar look (like Serif or Monospace)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Generic font families include

A

Serif
Sans Serif
Monospace

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

Examples of font families include

A
Times New Roman 
Georgia 
Arial 
Verdana 
Courier New 
Lucida Console
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Properties: Font-Size

A

The font-size property sets the size of a font. One way to set the size of fonts on the web is to usekeywords.For examplexx-small,small,medium,large,larger, etc.

Ex:

The CSS:
p.small {
font-size: small;
}
p.medium {
font-size: medium;
}
p.large {
font-size: large;
}
p.xlarge {
font-size: x-large;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Properties: Font-Style

A

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

The HTML:<p class="italic">This is a paragraph in italic style.</p>
The CSS:
p.italic {
font-style: italic;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The three values of the font-style property

A

Normal
Italic
Oblique

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

Tag for italic font style

A

<i></i>

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

Properties: Font-weight

A

The font-weight controls the boldness or thickness of the text.

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

Values that can be set for the font-weight property

A

Normal
Bold
Bolder
Lighter

E.g.,

The HTML:<p class="light">This is a font with a "lighter" weight.</p><p class="bold">This is a font with a "bold" weight.</p><p class="bolder">This is a font with a "bolder" weight.</p>
The CSS:
p.light { 
font-weight: lighter;
}
p.bold { 
font-weight: bold;
}
p.bolder {
font-weight: bolder;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Another way to define the “font-weight” property

A

You can also define the font weight with a number from100(thin) to900(thick), according to how thick you want the text to be.
400 is the same as normal, and 700 is the same as bold.

The HTML:<p class="light">This is a font with a "lighter" weight.</p><p class="thick">This is a font with a "bold" weight.</p><p class="thicker">This is a font with a "700" weight.</p>
The CSS:
p.light {
font-weight: lighter;
}
p.thick {
font-weight: bold;
}
p.thicker {
font-weight: 700;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly