selectors Flashcards

1
Q

type selector

A

any HTML tag

h1 {}

p {}

section {}

etc.

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

class selector

A

selects the elements under the same class

.text-quote {}
.container {}

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

attribute selector

A

A selector that allows you to select an element based on the presence of a specific attribute

a[title] {

}

a[href=”https://google.com”] {}

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

What is a psuedo-class?

A

A selector that chooses elements in a specific state.

a:hover {}

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

What is a pseudo-element?

A

A selector that choose only part of an element.

p::first-line {}

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

What is the universal selector?

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

What is an id selector?

A

first-form-field {}

selects the one element with a specified id.

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

What are the user action pseudo-classes?

A

:hover //matches when a user hovers the pointer on the element

:active //matches when an item is being activated ‘click on’ by the user

:focus //matches when the element has focus

:focus-visible
:focus-within

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