CSS Flashcards

1
Q

This describes how HTML documents are to be rendered on screen.

A

CSS (Cascading Style Sheets)

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

CSS makes use of _________ (except in inline style) to specify which element/s to apply style to.

A

selector

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

in selector

A

to select id

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

. in selector

A

to select class

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

main.text

A

combination of both id and class

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

main .text

A

refers to the child element of ‘main’ that have the class ‘text’

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

main > .text

A

refers to the direct child element of main that has class text.

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

class=”one two”

A

has two class name = one, two

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

.one.two

A

select tags that have both the one and two class name.

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

.one, .two

A

refers to multiple elements that have either one or two as class name.

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
  1. Inline styling
  2. Internal style sheets
  3. External style sheets.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to add an external stylesheet to html?

A

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

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

CSS allows several style sheets to ________________ of a document (hence Cascading).

A

influence the presentation

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

Factors in Cascading:

A
  1. Importance and Origin.
  2. Specificity
  3. Source Order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The style of any element has 3 possible origins:

A
  1. Author
  2. User
  3. User-Agent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

This origin of CSS is provided by the webpage author.

16
Q

This origin of CSS is due to browser settings as configured by the ______.

17
Q

This origin of CSS is the default type sheet of the rendering engine.

A

User Agent.

18
Q

By default, styles originating from the author take _______ over User and User Agent Styles.

A

precedence

19
Q

________ declarations take precedence over non-important ones.

A

!important

20
Q

For conflicting rules of similar weight, the ________ is applied.

A

last rule (source order)

21
Q

!important declarations also ___________ the order of precedence by origin.

22
Q

Specificity is determined by ____________________ of tags ,classes, id, attributes, etc., in the selector.

A

counting the number

22
Q

The most ________ selector takes precedence

23
Q

Determining factors for specificity

A
  1. In-line
  2. Contains an ID
  3. Number of Classes, attributes, and pseudo-classes.
  4. Number of tags and pseudo elements.
24
Q

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

A

Pseudo Element

25
Q

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

A

Pseudo Class

25
Q

If importance, origin, and specificity are all equal, the last declared style overrules the rest.

A

Source Order

26
Q

This kicks in when no source tries to set a property.

A

Inheritance

26
Q

It’s way of propagating values from parent elements to children, eliminating redundancy.

A

Inheritance

26
Q

Not all properties can be _________.

A

Inherited e.g. border.

26
Q

If even inheritance does not result in a value for a property, then the __________________ is used.

A

default value

27
Q

Surfing the web on mobile is verry commonplace, so it’s more important than ever to ______________________.

A

optimize websites for mobile.

28
Q

It would be difficult to hard-code layouts for all existing screen sizes, so web pages need to be ________.

A

responsive

29
Q

Responsive design is achieved through the use of _______________.

A

media queries.

30
Q

Media Queries are used to apply a block of CSS only if _____________.

A

certain conditions are met

31
Q

Media Queries in CSS can check for:

A
  • Width/height of the viewport
  • Width/height of the device
  • Orientation
  • Resolution
  • Media Type(screen, print, speech)
32
Q

Most developers design _________.

A

Mobile-first