CSS Flashcards

(39 cards)

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.

18
Q

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

19
Q

________ declarations take precedence over non-important ones.

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
Determining factors for specificity
1. In-line 2. Contains an ID 3. Number of Classes, attributes, and pseudo-classes. 4. Number of tags and pseudo elements.
24
This can be appended to a selector to style specific parts of an element.
Pseudo Element
25
This can be appended to a selector to style a special state of an element.
Pseudo Class
25
If importance, origin, and specificity are all equal, the last declared style overrules the rest.
Source Order
26
This kicks in when no source tries to set a property.
Inheritance
26
It's way of propagating values from parent elements to children, eliminating redundancy.
Inheritance
26
Not all properties can be _________.
Inherited e.g. border.
26
If even inheritance does not result in a value for a property, then the __________________ is used.
default value
27
Surfing the web on mobile is verry commonplace, so it's more important than ever to ______________________.
optimize websites for mobile.
28
It would be difficult to hard-code layouts for all existing screen sizes, so web pages need to be ________.
responsive
29
Responsive design is achieved through the use of _______________.
media queries.
30
Media Queries are used to apply a block of CSS only if _____________.
certain conditions are met
31
Media Queries in CSS can check for:
- Width/height of the viewport - Width/height of the device - Orientation - Resolution - Media Type(screen, print, speech)
32
Most developers design _________.
Mobile-first
33