CSS Selectors

CSS Selectors

Assessment

Interactive Video

Computers

7th Grade

Hard

Created by

Janielle Hembrador

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of CSS selectors?

To define new HTML elements.

To add interactivity to web pages.

To target specific HTML elements for styling.

To create server-side logic for web applications.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following are considered simple CSS selectors?

Pseudo-classes, pseudo-elements, and combinators.

Tag name, ID, and class selectors.

Attribute selectors, descendant selectors, and child selectors.

Universal selectors, adjacent sibling selectors, and general sibling selectors.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol is used to mark an ID selector in CSS, and what is its key characteristic?

Period (.), used for multiple elements.

Hash (#), used for a single, specific element.

Asterisk (*), used for all elements.

Colon (:), used for pseudo-elements.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are class selectors marked in CSS, and what is their primary use?

With a hash (#), to target a unique element.

With a period (.), to apply a style to multiple elements.

With a colon (:), to select elements based on their state.

With a tag name, to select all elements of that type.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the benefit of grouping selectors in CSS, and how are they separated?

It makes the code harder to read; they are separated by semicolons.

It applies different styles to different elements; they are separated by spaces.

It saves time and ensures consistency; they are separated by commas.

It creates complex animations; they are separated by hyphens.