CSS Flashcards

1
Q

What is CSS?

A

CSS (which stands forCascadingStyle Sheets) is a language used to describe the appearance and formatting of your HTML.

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

What is a style sheet?

A

A file that describes how an HTML file should look.

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

What does cascading describe?

A

Cascading means that the sheets can apply formatting when more than one style applies.

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

Give an example of cascading.

A

All paragraphs are assigned a blue font, but you specifically single out one paragraph to have a red font.

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

What code line is necessary in the HTML head that links an HTML page to a stylesheet?

A
type = "text/css"
rel = "stylesheet"
href = points to the web address or location of you CSS file on the server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give an example of two “self-closing” tags.

A

<img></img>

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

Describe the CSS general format.

A

selector {
property: value;
}

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

Describe a selector.

A

Aselectorcan be any HTML element, such as<p>,<img></img>, or. You just take off the<>s! To make a paragraph’s text red with CSS, you’d type:

p {
color: red;
}

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

Describe a property.

A

Apropertyis an aspect of a selector. For instance, you can change thefont-family,color, andfont-sizeof the text on your web pages.

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

Describe a value.

A

Avalueis a possible setting for a property.colorcan be red, blue, black, or almost any color;font-familycan be a whole bunch of different fonts; and so on.

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

What is the purpose of a semi-colon at the end of a property-value.

A

That’s how CSS knows you’re done with one pair and ready for the next.

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

What is the property for changing the font?

A

font-family

example: font-family: Arial;

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

What is the property for changing the color?

A

color

example: color:blue;

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

What is the property for changing the font size?

A

font-size

example: font-size:24px;

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

How are you able to reset your browsers zoom if it has changed?

A

Type Command+0 or Ctrl+0 to reset your view.

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

What is the property for changing the background color?

A

background-color

example: background-color:yellow;

17
Q

How do you “comment” in CSS?

18
Q

How does PX (pixel) work in CSS?

A

A pixel is a dot on your computer screen. Specifying font sizes in pixels is great when you want the user to see exactly on their screen what you designed on yours, though it assumes your screens are of similar size.

19
Q

Why are EM’s better than PX’s?

A

Thefont-sizeunitemis arelative measure: one em is equal to the default font size on whatever screen the user is using. That makes it great for smartphone screens, since it doesn’t try to tell the smartphone exactlyhow big to make a font: it just says, “Hey, 1em is the font size that you normally use, so 2em is twice as big and 0.5em is half that size!”

20
Q

What scripting would you use to use the “backup font” feature in CSS?

A

font-family:Tahoma, Verdana, sans-serif;

Separate font types by a comma in the order in which they should appear should one type fail.