CSS Selectors, Properties and Declarations Flashcards

(58 cards)

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
CSS Property: color
Sets the color of text
26
What notation can you use for CSS colours
keyword, rrggbb, rgb and rgb(r, g, b)
27
What do CSS length values consist of
a number followed by a unit
28
CSS Unit: px
Length in pixels which is determined by the monitors resolution
29
CSS Unit: pt
Length in point, a measure from typography that is equivalent to 1/72 of an inch
30
CSS Unit: cm
Length in centimetres
31
CSS Unit: in
Length in inches
32
CSS Unit: em
Length that is relative to the size of the current font
33
CSS Unit: %
Length as a proportion of the size of the element's parent
34
CSS Property: border-width
sets the length of the border
35
CSS Property: border-style
Sets the style of the border
36
CSS Property: border-color
Sets the colour of the border
37
CSS Property: border
border is a shorthand property for setting the style, color and length of the border
38
CSS Property: background-color
Sets the background colour
39
CSS Property: background-image
Gives the background an image
40
CSS Property: background-repeat
Defines how background images are repeated
41
CSS Property: background-position
Sets the initial background position of the background image
42
CSS Property: background-attachment
Determines whether that image's position is fixed within the viewport, or scrolls along with its containing block
43
CSS Property: padding
Sets the padding space on all sides of an element
44
CSS Property: padding-bottom
Sets the height of the padding area at the bottom of an element
45
CSS Property: padding-left
Sets the padding space required on the left side of an element
46
CSS Property: padding-right
Sets the padding space required on the right side of an element
47
CSS Property: padding-top
Sets the padding space required on the top of an element
48
CSS Property: margin
Sets the margin for all four sides
49
CSS Property: margin-bottom
Sets the margin space required on the bottom of an element
50
CSS Property: margin-left
Sets the margin space required on the left side of an element
51
CSS Property: margin-right
Sets the margin space required on the right side of an element
52
CSS Property: margin-top
Sets the margin space required on the top of an element
53
CSS Property: display
Specifies the type of rendering box used for an element.
54
What two CSS properties do floats rely on
float and clear
55
CSS Property: float
Determines which side the elements floats to
56
CSS Property: clear
Determines how the element behaves with respect to other floated elements
57
What values does the CSS property float take
left, right and none
58
What values does the CSS Property clear take
left, right, both and none