CSS Selectors Flashcards

1
Q

CSS

A

Cascading Style Sheets

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

comments

A

/(asterisk) (asterisk)/

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

external style sheet linking syntax

A
Link
Href="..."
Rel="stylesheet"
type="text/css"
Media="all"
/link
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

element selector

A

E

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

universal selector

A

*

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

class selector

A

.class

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

Id selector

A

id

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

targeting a specific element with a class

A

E.class

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

grouping multiple selectors

A

E, F, G

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

descendant selector (does not need to be a direct child)

A

E (space) F

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

negation selector

A

E:not(x)

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

direct child selectors

A

E > F

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

immediate adjacent selector

A

E + F

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

immediate predecessor selector

A

E ~ F

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

selects all elements with the attribute

A

[attribute]

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

selects all elements with the attribute value

A

[attribute=”value”]

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

element whose attribute value is a list of whitespace-separated values, one of which is exactly equal to “value”

A

E[attribute~=”value”]

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

element whose attribute value begins with exactly the string”value”

A

E[attribute^=”value”]

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

element whose attribute value ends with exactly the string “value”

A

E[attribute$=”value”]

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

element whose attribute value has the substring “value” in it at all

A

E[attribute*=”value”]

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

element whose attribute value has hyphen seperated text including the string “value”

A

E[attribute|=”value”]

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

not yet visited link

A

a:link

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

visited link

A

a:visited

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

active link (during certain user actions)

A

a:active

25
Q

link hover

A

a:hover

26
Q

element being targeted with an anchor

A

E:target

27
Q

element in focus

A

E:focus

28
Q

element with the specified language

A

E:lang(en)

29
Q

element with no children

A

E:empty

30
Q

enable element

A

E:enabled

31
Q

disabled element

A

E:disabled

32
Q

checked element (checkbox)

A

E:checked

33
Q

generated content before an element

A

E::before

34
Q

generated content after an element

A

E::after

35
Q

targets the portion of the element selected by the user

A

::selected

36
Q

the first child of this type in its parent

A

E:first-child

37
Q

first formatted text line selector

A

E:first-line

38
Q

first formatted letter selector

A

E:first-letter

39
Q

first child of that element type

A

E:first-of-type

40
Q

the last child of this type that is also the last element in its parent

A

E:last-child

41
Q

the last child of this type in its parent

A

E:last-of-type

42
Q

selects every element that is the only element of its type in its parent

A

E:only-of-type

43
Q

the nth child of parent

A

E:nth-child(x)

44
Q

nth child- custom repetition

A

E:nth-child(2x)

45
Q

nth child- counting up instead

A

E:nth-child(-2x)

46
Q

nth child- starting at a custom start point

A

E:nth-child(x+5)

47
Q

nth child- start point is negative from the repetition (starts at 3)

A

E:nth-child(5x-2)

48
Q

nth child- odd

A

E:nth-child(odd)

49
Q

nth child- even

A

E:nth-child(even)

50
Q

nth child- counting from the bottom

A

E:nth-last-child(x)

51
Q

the nth child of this elements type

A

E:nth-of-type(x)

52
Q

the nth child of this element type counting from the last one

A

E:nth-last-of-type(x)

53
Q

input element with the “required” attribute active

A

input:required

54
Q

input element with no “required” attribute

A

input:optional

55
Q

input element with a value outside a specified range

A

input:out-of-range

56
Q

input element with the “readonly” attribute specified

A

input:read-only

57
Q

input element with NO “readonly” attribute specified

A

input:read-write

58
Q

input element with a valid value in its field

A

input:valid