wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSS Day-1

Total questions: 25

Worksheet time: 17mins

Name
Class
Date
1.

What does CSS stand for?

a)

Color Style Sheets

b)

Creative Style Sheets

c)

Cascading Style Sheets

d)

Computer Style Sheets

2.

Which CSS is written directly inside an HTML element?

(a)  

3.

Where is Internal CSS written?

a)

Inside <body>

b)

Inside <style> tag in <head>

c)

Inside an external file

d)

Inside <style> tag in <script>

4.

Which CSS type uses a separate .css file?

a)

Inline

b)

Internal

c)

External

d)

Embedded

5.

What is the correct CSS syntax?

a)

{body:color=black;}

b)

body {color: black;}

c)

body color: black;

d)

body = color black;

6.

A CSS rule starts with a (a)   .

7.

What is red in color: red;?

a)

Property

b)

Selector

c)

Declaration

d)

Value

8.

Which is a correct grouping selector?

a)

h1 h2 h3

b)

h1, h2, h3

c)

h1 > h2 > h3

d)

h1 + h2

9.

How many main combinator selectors are in CSS?

(a)  

10.

Which selector applies style to p inside div?

a)

div + p

b)

div > p

c)

div p

d)

div, p

11.

What is a pseudo-class in CSS?

a)

A class name starting with dot

b)

A keyword added to selectors to define a special state

c)

A JavaScript function

d)

An HTML attribute

12.

Which pseudo-class applies when the mouse is over an element?

(a)  

13.

What is the primary function of the CSS `::before` pseudo-element?

a)

To change the style of an element when a user clicks on it.

b)

To insert and style content immediately after an element's main content.

c)

To style the first letter of an element's text content.

d)

To insert and style content immediately before an element's main content.

14.

Which pseudo-element styles the first letter of text?

a)

::first-line

b)

::before

c)

::first-letter

d)

::after

15.

Which property is required with ::before and ::after?

a)

color

b)

display

c)

content

d)

position

16.

Which pseudo-element styles placeholder text?

a)

::input

b)

::placeholder

c)

::text

d)

::value

17.

What is the purpose of the `overflow: hidden;` property?

a)

It adds scrollbars to the element, regardless of whether the content fits.

b)

It clips any content that extends beyond the element's boundaries, making it invisible.

c)

It allows the content to spill out and be visible outside the element's boundaries.

d)

It adds scrollbars to the element only if the content is too large to fit.

18.

Which combinator selector styles all `<p>` elements that are siblings of and appear after an `<h1>` element, regardless of whether they are immediately adjacent?

a)

h1 > p

b)

h1~p

c)

h1`p

d)

h1+p

19.

Which property sets the space outside the element?

a)

padding

b)

margin

c)

border

d)

outline

20.

In content-box, the width property applies to:

a)

content only

b)

content + padding

c)

content + padding + border

d)

total element width

21.

Using border-box includes __________ in total element width.

a)

content only

b)

content + padding + border

c)

margin only

d)

padding only

22.

Using content-box can cause layout issues when using (a)   widths.

23.

In CSS syntax, what is the term for the part of a rule that targets the HTML element to be styled, such as 'p' or '#header'?

(a)  

24.

Which overflow value hides overflowing content?

(a)  

25.

A box is defined with `width: 300px;`, `padding: 20px;`, and `border: 10px solid;`. If the `box-sizing` property is set to its default value, `content-box`, what will be the total calculated width of the box?



(a)