CSS Flashcards

1
Q
  1. A _______ is a file that describes how an HTML file should look.
  2. Style sheets are _______ because the sheets can apply formatting when more than one style applies.
A
  1. style sheet
  2. cascading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two main reasons for separating your form/formatting (CSS) from your functional content/structure (HTML):

A

1. You can apply the same formatting to several HTML elements without rewriting code (e.g.style=”color:red”:) over and over.

2. You can apply similar appearance and formatting to several HTML pages from a single CSS file.

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

If you want to write your CSS in the same document as your HTML, place it in the < head> < /head> between _____ tags.

A

< style> < /style>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. How do you connect an HTML document to it’s CSS file?
  2. What three attributes does the < link> tag need?
A

1 Set up a < link> tag in the head.

  1. type, rel, & href
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the following tag do?

< link type=”text/css”; rel=”stylesheet”; href=”stylesheet.css”>

A

Links to a CSS file in an HTML document.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. What is a selector?
  2. What is a property?
  3. What is a value?
A
  1. Any HTML element, such as < p>, < img>, or < table>. You just take off the < >s.
  2. An aspect of a selector.

Example: font-family, color, font-size

  1. A possible setting for a property.

Ex: red

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. What is the general format for CSS syntax?
  2. You need to end each property-value pair with a ___. That’s how CSS knows you’re done with one pair and ready for the next.
A
  1. selector { property: value; }
  2. semicolon (;)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Property-value pairs should always end in a ____ (_)

A

semi-colon ;

Example:

color: green;

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

What does a comment in CSS look like?

A

/* Comments in CSS are helpful for organization */

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

Font values can be set in pixels ( px ) or ___.

A

ems

Ex - font-size: 1em;

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

The font-size unit ___ is a relative measure: _____ is equal to the default font size on whatever screen the user is using. That makes it great for smartphone screens.

A

ems

1em

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

How do you create a “box” or container in CSS?

A

Select div & set property-value pairs for background-color, height, and width.

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