Mastering CSS Class Selectors

Mastering CSS Class Selectors

Assessment

Interactive Video

Computers

10th Grade

Hard

Created by

Amelia Wright

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the general format for a CSS rule?

Class name followed by square brackets and tag names inside.

Tag name followed by curly braces and class names inside.

Selector followed by curly braces and declarations inside.

Selector followed by parentheses and declarations inside.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What attribute do you use to assign a class to an HTML element?

type

class

style

id

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you select HTML elements by class in CSS?

Using the tag name followed by the class name.

Using the class name directly without any symbol.

Using the . symbol followed by the class name.

Using the # symbol followed by the class name.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the period (.) symbol signify in CSS?

It indicates a class selector.

It indicates a pseudo-class.

It indicates an ID selector.

It indicates a tag selector.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you make a CSS rule apply only to

tags with a specific class?

By using the class name followed by the

tag.

By using the # symbol followed by the class name within

tags.

By using the

tag followed by the . symbol and the class name.

By using the class name directly within

tags.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you increase the specificity of a CSS rule?

By using the !important declaration.

By combining tag and class selectors.

By adding more classes to the rule.

By writing the rule at the bottom of the CSS file.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can a single HTML element have multiple classes?

No, an HTML element must have a unique class.

Yes, by separating class names with commas.

No, an HTML element can only have one class.

Yes, by separating class names with spaces.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?