wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mastering CSS Concepts

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the purpose of CSS selectors?

a)

To create HTML elements from scratch.

b)

To define the structure of a webpage.

c)

To add interactivity to HTML elements.

d)

The purpose of CSS selectors is to select HTML elements for styling.

2.

Which selector targets all elements of a specific type?

a)

Type selector

b)

Class selector

c)

Universal selector

d)

ID selector

3.

How do you select an element with a specific class in CSS?

a)

*example

b)

.example

c)

#example

d)

.class_name

4.

What is the difference between 'flex-start' and 'flex-end' in Flexbox?

a)

'flex-start' aligns items at the start of the container, while 'flex-end' aligns them at the end.

b)

'flex-start' and 'flex-end' are the same

c)

'flex-end' aligns items vertically in the middle

d)

'flex-start' moves items to the center

5.

How do you create a Flexbox container?

a)

Apply 'float: left' to the container element.

b)

Set the CSS property 'display' to 'flex' on the container element.

c)

Set the CSS property 'display' to 'block' on the container element.

d)

Use the CSS property 'flex-direction' on the child elements.

6.

What property is used to define the number of columns in a CSS Grid?

a)

grid-template-rows

b)

grid-columns

c)

grid-area

d)

grid-template-columns

7.

How do you center an item in a Flexbox layout?

a)

Use 'justify-content: center' and 'align-items: center' on the flex container.

b)

Use 'margin: auto' on the item itself.

c)

Apply 'text-align: center' to the flex container.

d)

Set 'display: block' on the flex container.

8.

What does the 'grid-template-areas' property do?

a)

It sets the gap between grid items.

b)

It defines named grid areas for layout in a CSS grid.

c)

It specifies the number of columns in a grid.

d)

It controls the size of grid items.

9.

Which CSS selector is used to select an element with a specific ID?

a)

.class

b)

#id

c)

[attribute='value']

d)

*

10.

How can you change the direction of items in a Flexbox layout?

a)

By using the 'flex-direction' property.

b)

By applying 'align-items' property.

c)

By setting 'display: block' on the container.

d)

By using 'justify-content' property.