1.6 Introduction to CSS Flashcards

(21 cards)

1
Q

What is the primary responsibility of CSS in a modern webpage?

A

describing the visual presentation and layout

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

In the CSS rule ‘p { color: blue; }’, what is the term for the ‘p’ part?

A

the selector

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

Where are CSS rules typically placed within an HTML file?

A

insider the <head> part within a <style> element</style>

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

What is the difference between the ‘padding’ and ‘margin’ properties?

A

padding is the spacing inside an element’s border, while margin is the spacing outside the border

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

Which CSS property would you use to change the typeface (e.g., Arial or Helvetica) of a paragraph?

A

font-family

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

In RGB color values, what color is represented by ‘rgb(0, 0, 0)’?

A

black

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

If you want to add 20 pixels of space specifically to the left side of a paragraph, which property should you use?

A

margin-left: 20px;

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

What is the result of setting ‘rgb(255, 0, 255)’?

A

Fuchsia (pink-purple)

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

A browser’s ‘default styling’ for a page with no CSS usually includes which of the following?

A

a white background with black, standardized text

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

Which CSS property should be used to change the color of the text itself within an element?

A

color

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

Define CSS

A

(Cascading Style Sheets)
The language used for describing the style and layout of a webpage.

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

Define selector

A

The part of a CSS rule that identifies which HTML element(s) to style (e.g., p, h1, strong)

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

Define property

A

The specific aspect of the element you want to change (e.g., font-size, background-color).

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

Define Declaration

A

The combination of a property and a value (e.g., color: red;).

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

Define RGB

A

(Red, Green, & Blue)
A color model that creates colors by combining Red, Green, and Blue light

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

Define hexadecimal

A

A base-16 numbering system often used as an alternative to RGB (e.g., #FFFFFF)

17
Q

In the rule strong { padding: 10px; }, which part is the selector and which is the property?

A

selector: strong
property: padding

18
Q

If you want to push two paragraphs further away from each other, would you increase their margin or their padding?

19
Q

What RGB value creates the color bright green?

A

rgb (0,255,0)

20
Q

Where specifically in an HTML file should the <style> tag be placed?</style>

A

in the <head>

21
Q

What is the difference between font-family and font-size?

A

Family handles the typeface/design, and size handles the physical dimensions.