Pseudo-elements Flashcards

1
Q

What is the purpose of CSS pseudo-elements?

A

They allow adding or targeting an extra element without modifying the HTML.

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

What do ::before and ::after pseudo-elements do?

A

They create child elements inside an element, but only on elements that accept children.

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

What property must be defined for ::before and ::after to work?

A

The content property, which can be a string or an image url.

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

What does ::first-letter target?

A

It styles the first letter of a block-level text element.

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

What display values must an element have for ::first-line to work?

A

block, inline-block, list-item, table-caption, or table-cell.

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

What is ::backdrop used for?

A

It styles the area behind elements in full-screen mode, such as <dialog> and <video>.</video></dialog>

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

What can ::marker style?

A

List bullets, numbers, and <summary> element arrows.

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

What does ::selection do?

A

It customizes the appearance of selected text.

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

What does ::placeholder style?

A

The placeholder text of input fields.

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