CSS Selectors, Properties and Declarations Flashcards

1
Q

What is a CSS selector

A

A HTML tag you want to affect using CSS

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

How does CSS a selector appear

A

A HTML tag without brackets

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

What do CSS properties do

A

Alter specific attributes of a selector

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

What is a declaration for a CSS selector

A

Specifying values for CSS properties

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

What are the CSS declaration and selector together referred to as

A

A set of rules or ruleset

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

In a typical CSS ruleset, what is the declaration enclosed in

A

Curly braces after the selector

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

What separates the CSS property and declaration

A

A colon

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

CSS Property: text-align

A

Indicate whether to centre the material or align it to the left or right

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

CSS Property: font-size

A

Sets the size of text

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

What is a CSS rule made up of

A

A selector and a semicolon-separated list of declarations inside brackets

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

What does each CSS declaration have

A

A property and a value separated by a colon

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

What are CSS type selectors

A

Selectors that match elements by their node name

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

What is a CSS declaration

A

The set of visual effects to be applied to a selector

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

What are CSS id selectors

A

Selectors that match elements based on their id attribute

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

What does a CSS id selector consist of

A

a hash character followed by the id

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

Where are CSS id selectors normally used

A

to pick out particular landmarks on a page

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

What are CSS class selectors

A

Selectors that match elements based on their class attribute

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

What does a CSS class selector consist of

A

a full stop (.) followed by the class name

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

What is the main benefit of a CSS class selector over an id selector

A

Multiple element can have the same class

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

What are CSS combinators

A

Selectors that allow more than one selector to be combined into a more complex rule

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

What do CSS descendant combinators consist of

A

A space between two selectors

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

What are CSS descendant combinators

A

Selectors that matches all elements that are descendants of a specified element

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

What do CSS child combinators consist of

A

A greater than bracket between two selectors

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

What are CSS descendant combinators

A

Selectors that allow you to select elements that are direct children of a parent

25
Q

CSS Property: color

A

Sets the color of text

26
Q

What notation can you use for CSS colours

A

keyword, rrggbb, rgb and rgb(r, g, b)

27
Q

What do CSS length values consist of

A

a number followed by a unit

28
Q

CSS Unit: px

A

Length in pixels which is determined by the monitors resolution

29
Q

CSS Unit: pt

A

Length in point, a measure from typography that is equivalent to 1/72 of an inch

30
Q

CSS Unit: cm

A

Length in centimetres

31
Q

CSS Unit: in

A

Length in inches

32
Q

CSS Unit: em

A

Length that is relative to the size of the current font

33
Q

CSS Unit: %

A

Length as a proportion of the size of the element’s parent

34
Q

CSS Property: border-width

A

sets the length of the border

35
Q

CSS Property: border-style

A

Sets the style of the border

36
Q

CSS Property: border-color

A

Sets the colour of the border

37
Q

CSS Property: border

A

border is a shorthand property for setting the style, color and length of the border

38
Q

CSS Property: background-color

A

Sets the background colour

39
Q

CSS Property: background-image

A

Gives the background an image

40
Q

CSS Property: background-repeat

A

Defines how background images are repeated

41
Q

CSS Property: background-position

A

Sets the initial background position of the background image

42
Q

CSS Property: background-attachment

A

Determines whether that image’s position is fixed within the viewport, or scrolls along with its containing block

43
Q

CSS Property: padding

A

Sets the padding space on all sides of an element

44
Q

CSS Property: padding-bottom

A

Sets the height of the padding area at the bottom of an element

45
Q

CSS Property: padding-left

A

Sets the padding space required on the left side of an element

46
Q

CSS Property: padding-right

A

Sets the padding space required on the right side of an element

47
Q

CSS Property: padding-top

A

Sets the padding space required on the top of an element

48
Q

CSS Property: margin

A

Sets the margin for all four sides

49
Q

CSS Property: margin-bottom

A

Sets the margin space required on the bottom of an element

50
Q

CSS Property: margin-left

A

Sets the margin space required on the left side of an element

51
Q

CSS Property: margin-right

A

Sets the margin space required on the right side of an element

52
Q

CSS Property: margin-top

A

Sets the margin space required on the top of an element

53
Q

CSS Property: display

A

Specifies the type of rendering box used for an element.

54
Q

What two CSS properties do floats rely on

A

float and clear

55
Q

CSS Property: float

A

Determines which side the elements floats to

56
Q

CSS Property: clear

A

Determines how the element behaves with respect to other floated elements

57
Q

What values does the CSS property float take

A

left, right and none

58
Q

What values does the CSS Property clear take

A

left, right, both and none