Cascading Style Sheets Flashcards

1
Q

What is the purpose of CSS?

A

To style and visually format HTML content.

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

What is a CSS class selector?

A

A style applied to elements with a specific class name (e.g. .button {}).

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

What does color: red; do in CSS?

A

Changes the text colour to red.

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

What is an ID selector in CSS?

A

Targets a single element with a unique ID (e.g. #main {}).

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

How do you link a CSS file to an HTML page?

A

Using <link></link> in the <head>.

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