Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML and CSS Quiz

Total questions: 26

Worksheet time: 13mins

Name
Class
Date
1.

What does HTML stand for?

a)

Hyper Text Markup Language

b)

Home Tool Markup Language

c)

Hyperlinks and Text Markup Language

2.

Which HTML tag is used to create a hyperlink?

a)

<a>

b)

<hyper>

c)

<href>

3.

What is the correct HTML element for the largest heading?

a)

h3

b)

h6

c)

h1

4.

Which attribute is used to provide the link address in an anchor tag?

a)

src

b)

href

c)

link

5.

What is the purpose of the <hr> tag?

a)

To create a list

b)

To display an image

c)

To create a line

6.

How do you add a comment in HTML?

a)

// This is a comment

b)
c)

# This is a comment

7.

How can you make a numbered list in HTML?

a)

ol

b)

li

c)

ul

8.

Which attribute specifies the width of an image in HTML?

a)

width

b)

size

c)

length

9.

Which HTML tag is used to define an unordered list?

a)

ol

b)

ul

c)

li

10.

What is the purpose of the <title> tag?

a)

To create a title on the webpage

b)

To set the title of the webpage in the browser tab

c)

To set the page title font size

11.

Which HTML tag is used to embed a video file in a web page?

a)

<mov>

b)

<video>

c)

<img>

12.

What does CSS stand for?

a)

Colorful Style Sheets

b)

Creative Style Sheets

c)

Cascading Style Sheets

13.

Where in an HTML document is the correct place to refer to an external CSS file?

a)

At the end of the document

b)

Inside the body tag

c)

Inside the head tag

14.

How do you apply a background color in CSS?

a)

background-color: blue;

b)

color-background: blue;

c)

bg-color: blue;

15.

Which HTML tag is used to define an internal style sheet?

a)

<style>

b)

<script>

c)

<link>

16.

How do you add a comment in CSS?

a)

/* This is a comment */

b)

// This is a comment

c)
17.

Which property is used to change the font of an element in CSS?

a)

font-family

b)

font-style

c)

font-type

18.

What is the correct syntax for referring to an external style sheet?

a)

<stylesheet>styles.css</stylesheet>

b)

<link rel="stylesheet" href="styles.css">

c)

<css src="styles.css">

19.

Which property is used to set the text color in CSS?

a)

text-color

b)

color

c)

font-color

20.

Which property is used to set the space between the content and the border in CSS?

a)

padding

b)

margin

c)

spacing

21.

How do you make text bold in CSS?

a)

font-weight: bold;

b)

text-style: bold;

c)

text-weight: bold;

22.

Which CSS property controls the text size?

a)

font-size

b)

text-size

c)

text-style

23.

How do you select an element with an id "header" in CSS?

a)

.header

b)

#header

c)

*header

24.

How do you group selectors in CSS?

a)

Separate each selector with a space

b)

Separate each selector with a comma

c)

Separate each selector with a semicolon

25.

Which property is used to set the background image in CSS?

a)

background-image

b)

bg-image

c)

background-img

26.

How do you make an element take up the full width of the browser window in CSS?

a)

width: 100%;

b)

full-width: true;

c)

max-width: 100%;