wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

css border

Total questions: 24

Worksheet time: 24mins

Name
Class
Date
1.

What is the main purpose of CSS?

a)

To create web pages

b)

To add logic to programs

c)

To style and design web pages

d)

To store data

2.

Which of the following is a block-level container used to group elements?

a)

span

b)

div

c)

img

d)

a

3.

Which property is used to set the background color of an element?

a)

color

b)

bgcolor

c)

background-color

d)

text-color

4.

Which CSS property adds an image as background?

a)

image

b)

background-image

c)

img

d)

picture

5.

Which value of background-repeat stops the image from repeating?

a)

repeat

b)

repeat-x

c)

repeat-y

d)

no-repeat

6.

Which background-size value makes the image cover the entire area?

a)

auto

b)

contain

c)

cover

d)

stretch

7.

Which property controls where the background image is placed?

a)

background-align

b)

background-position

c)

image-position

d)

align

8.

Which CSS property gives rounded corners to an element?

a)

border-style

b)

border-width

c)

border-radius

d)

border-color

9.

Which property adds space outside an element?

a)

padding

b)

border

c)

margin

d)

spacing

10.

Which property adds space inside an element?

a)

margin

b)

padding

c)

border

d)

outline

11.

Which HTML tag is used to create an unordered list?

a)

ol

b)

li

c)

ul

d)

dl

12.

Which HTML tag is used to create a table row?

a)

td

b)

th

c)

tr

d)

table

13.

Which property adds space inside table cells?

a)

margin

b)

spacing

c)

padding

d)

height

14.

Which property sets the width of a table?

a)

size

b)

table-width

c)

width

d)

length

15.

Which property aligns text inside table cells?

a)

align

b)

text-align

c)

vertical-align

d)

font-align

16.

Which of the following can be styled using CSS on a div?

a)

Background

b)

Border

c)

Margin and padding

d)

All of the above

17.

Why is the div tag important in webpage design?

a)

It adds images

b)

It creates links

c)

It helps structure and layout content

d)

It stores data

18.

Which value of background-repeat repeats the image only horizontally?

a)

repeat

b)

repeat-x

c)

repeat-y

d)

no-repeat

19.

Which of the following is a valid value for background-position?

a)

middle

b)

centre

c)

center

d)

mid

20.

Which property controls the thickness of the border?

a)

border-size

b)

border-style

c)

border-width

d)

border-radius

21.

What does HEX color code start with?

a)

$

b)

%

c)

#

d)

&

22.

Which function is used to define color using red, green, and blue values?

a)

color()

b)

rgb()

c)

hex()

d)

hsl()

23.

What is the maximum value for RGB colors?

a)

100

b)

255

c)

256

d)

500

24.

Which of the following is NOT a valid way to add color in CSS?

a)

Color name

b)

HEX code

c)

RGB value

d)

HTML color tag