12 - CSS Flashcards

1
Q

describe how HTML documents are to be rendered on screen

A

Cascading Style Sheets (CSS)

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

CSS makes use of ___ to specify which elements to apply style to

A

selectors

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

selector for id

A

#

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

selector for class

A

.

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

child element (access text)

<p id = 'main'> <span class='text'></span> </p>

A

main .text

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

direct child element (access text)

<div id='main'> <span class = 'text'></span> </div>

A

main > .text

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

combination: access .one

<div class = 'one'></div>
<div class = 'one two'></div>

A

div .one

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

combination: access class one two
<div class = 'one two'></div>

A

div.one.two

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

multiple: access both divs

<div class = 'one'></div>
<div class = 'two'></div>

A

.one, .two

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

3 ways to declare CSS in HTML

A

inline styling
internal style sheets
external style sheets

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

factors in cascading (3)

A

importance and origin
specificity
source order

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

style of any element has 3 possible origins

A

author
user
user-agent

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

css provided by the web page author

A

author

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

browser settings as configured by the user

A

user

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

default style sheet of the rendering engine

A

user agent

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

css hierarchy based on origin

A

author > user > user agent

17
Q

take precedence over non-important ones

A

!important

18
Q

reverse the order of precedence by origin

A

!important

19
Q

reversed style precedence by origin due to !important

A

important user agent > important user > important author > author > user > user agent

20
Q

determined by counting the number of tags, classes, id, attributes, etc

A

specificity

21
Q

determining factors for specificity (4)

A
  • in-line
  • contains an id
  • # of classes, attributes, pseudo-classes
  • # of tags and pseudo elements
22
Q

can be appended to a selector to style specific parts of an element

A

pseudo element

23
Q

5 pseudo elements

A

::after
::before
::first-letter
::first-line
::selection

24
Q

can be appended to a selector to style a special state of an element

A

pseudo class

25
Q

last declared style overrules the rest

A

source order

26
Q

kicks in when no source tries to set a property

A

inheritance

27
Q

responsive design is achieved through the use of ____

A

media queries

28
Q

used to apply a block of css only if certain conditions are met

A

media queries