Week 4 Flashcards

1
Q

What does CSS stand for?

A

Cascading Style Sheets

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

What is the style instruction that style sheets are made up of?

A

Rules or rule sets

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

What are the 2 parts of a rule?

A
  1. Selector

2. Declaration

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

What is a selector and what are the three types?

A

A selector is how you target something in your HTML to have style rules applied to it

  1. Element
  2. Class
  3. ID
    (ex: h1 (selector) { colour: red; } (declaration))
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a declaration?

A

A declaration is how you are defining the actual style rules to be applied, which is made up of a property/value pair
(ex: h1 { colour: (property) red; (value) }

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

What are the 3 ways that you can add styles to HTML documents through CSS?

A
  1. External style sheets
  2. Embedded style sheets
  3. Inline styles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an external style sheet?

A
  • A separate text-only document containing all of your style rules
  • Must be named with the .css extension
  • The most powerful (and preferred) method of adding styles to a site
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an embedded style sheet?

A
  • Same style rules as an external style sheet but embedded in the of a single HTML document
  • All embedded style rules must be wrapped in the element
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an inline style sheet?

A
  • You can apply rules to a singular element using the style attribute within the element itself
  • Inline styles only apply to the element in which they directly appear
  • Least preferred method
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the style sheet hierarchy?

A

Inline styles OVERWRITE
Embedded styles OVERWRITE
External styles

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

Which two principles determine cascading priority?

A
  1. Last rule

2. Specificity

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

What is the last rule?

A

The latter of two selectors will take precedent

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

What is the specificity rule?

A

The most specific selector will take precedence over the more general one(s)

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

What are the three ways in which you can express colour in CSS?

A
  1. RGB Values - colours in terms of how much red, green and blue (eg: 100,100,90)
  2. Hex Codes - Six digit codes that represent the amount of red, green and blue in a colour proceeded by a hashtag (eg: #ee3e80)
  3. Colour Names - 147 predetermined colours recognized by browsers (eg: DarkCyan)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is HSLA?

A

Hue, Saturation, Lightness and Alpha which determines opacity (optional)

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

What are the three properties for boxes that can be adjusted to control its appearance?

A
  1. Border - Separates the edge of one box from another
  2. Margin - Margins sit outside the edge of the border
  3. Padding - The space between the border of a box and any content contained within it
17
Q

What are the positioning schemes in CSS?

A
  1. Normal Flow (static)
  2. Relative Positioning (relative)
  3. Absolute Positioning (absolute)
  4. Fixed Positioning (fixed)
  5. Floating Elements (float)
18
Q

What is a font-weight?

A

The font-weight property allows you to set (or remove) the “boldness” of a particular text element

  • Numeric Values: 100, 200, 300, 400(!), 500, 600 (!), 700
  • Keywords: Normal, bold, bolder, lighter, inherit
19
Q

What is text transform?

A

Property that allows you to change the casing of a particular text element (uppercase, lowercase, capitalize)

20
Q

What is text-decoration?

A

Property that allows you to add underlines, overlines, strikethroughs