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)

25
link hover
a:hover
26
element being targeted with an anchor
E:target
27
element in focus
E:focus
28
element with the specified language
E:lang(en)
29
element with no children
E:empty
30
enable element
E:enabled
31
disabled element
E:disabled
32
checked element (checkbox)
E:checked
33
generated content before an element
E::before
34
generated content after an element
E::after
35
targets the portion of the element selected by the user
::selected
36
the first child of this type in its parent
E:first-child
37
first formatted text line selector
E:first-line
38
first formatted letter selector
E:first-letter
39
first child of that element type
E:first-of-type
40
the last child of this type that is also the last element in its parent
E:last-child
41
the last child of this type in its parent
E:last-of-type
42
selects every element that is the only element of its type in its parent
E:only-of-type
43
the nth child of parent
E:nth-child(x)
44
nth child- custom repetition
E:nth-child(2x)
45
nth child- counting up instead
E:nth-child(-2x)
46
nth child- starting at a custom start point
E:nth-child(x+5)
47
nth child- start point is negative from the repetition (starts at 3)
E:nth-child(5x-2)
48
nth child- odd
E:nth-child(odd)
49
nth child- even
E:nth-child(even)
50
nth child- counting from the bottom
E:nth-last-child(x)
51
the nth child of this elements type
E:nth-of-type(x)
52
the nth child of this element type counting from the last one
E:nth-last-of-type(x)
53
input element with the "required" attribute active
input:required
54
input element with no "required" attribute
input:optional
55
input element with a value outside a specified range
input:out-of-range
56
input element with the "readonly" attribute specified
input:read-only
57
input element with NO "readonly" attribute specified
input:read-write
58
input element with a valid value in its field
input:valid