wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML and CSS Quiz 2023

Total questions: 20

Worksheet time: 13mins

Name
Class
Date
1.

What does HTML stand for?

a)

Hyper Transfer Markup Language

b)

HyperText Markup Language

c)

High-Tech Multimedia Language

d)

Hyperlink Text Management Language

2.

What does CSS stand for?

a)

Cascading Style Scripts

b)

Creative Style Sheets

c)

Cascading Style Sheets

d)

Computer Style Selections

3.

How can you control the font size in CSS?

a)

Using the `font-style` property

b)

Using the `font-size` property

c)

Using the `text-transform` property

d)

Using the `font-family` property

4.

How can you change the width and height of elements in CSS?

a)

Using the `width` and `height` properties

b)

Using the `color` property

c)

Using the `text-align` property

d)

Using the `margin` property

5.

What are classes and IDs used for in HTML and CSS?

a)

Adding comments to the code

b)

Applying styles to specific elements

c)

Creating hyperlinks

d)

Changing the font color

6.

Which HTML tag is used to create a hyperlink?

a)

     - a) `<link>`

   

b)

   - b) `<href>`

  

c)

    - c) `<a>`

    

d)

  - d) `<url>`

7.

Write HTML code to create an ordered (numbered) list with three items and explain how it works.

4 lines
8.

How can you make text appear in italics using CSS?

a)

font-weight: italic;

b)

font-style: italic;

c)

text-decoration: italic;

d)

font-variant: italic;

9.

Which CSS property allows you to control the space inside an element, between its content and its border?

a)

margin

b)

padding

c)

border

d)

width

10.

Which HTML heading element represents the highest level of importance?

a)

      - a) `<h1>`

  


b)

    - b) `<h2>`

c)

      - c) `<h3>`

d)

- d) `<h4>`

11.

How can you make a background image cover the entire container in CSS?

a)

background-size: contain;

b)

background-size: cover;

c)

background-size: 100%;

d)

background-size: auto;

12.

Which HTML tag is used to display images?

a)

   - a) `<img>`

    


b)

  - b) `<picture>`

 

c)

     - c) `<image>`

    

d)

  - d) `<imgsrc>`

13.

What is the purpose of the <head> tag in HTML?

a)

The purpose of the tag in HTML is to define the navigation section of the HTML document.

b)

The purpose of the tag in HTML is to define the footer section of the HTML document.

c)

The purpose of the tag in HTML is to define the head section of the HTML document.

d)

The purpose of the tag in HTML is to define the body section of the HTML document.

14.

How can you change the color of text using CSS?

a)

'font-color' property

b)

'text-color' property

c)

'color' property

d)

'background-color' property

15.

What is the purpose of the <body> tag in HTML?

a)

The purpose of the tag in HTML is to define the header of an HTML document.

b)

The purpose of the tag in HTML is to define the navigation menu of an HTML document.

c)

The purpose of the tag in HTML is to define the footer of an HTML document.

d)

The purpose of the tag in HTML is to define the main content of an HTML document.

16.

How can you center align text using CSS?

a)

text-align: left;

b)

text-align: right;

c)

text-align: justify;

d)

text-align: center;

17.

How can you center align text using CSS?

a)

text-align: right;

b)

text-align: center;

c)

text-align: justify;

d)

text-align: left;

18.

What is the difference between HTML and CSS?

a)

HTML is used for styling and layout, while CSS is used for structuring content.

b)

HTML is used for structuring content, while CSS is used for styling and layout.

c)

HTML and CSS are the same thing.

d)

HTML is used for creating dynamic web pages, while CSS is used for static web pages.

19.

How can you add a background color to an HTML element?

a)

By using the CSS 'color' property.

b)

By using the CSS 'background-image' property.

c)

By using the HTML 'background' attribute.

d)

By using the CSS 'background-color' property.

20.

What is the purpose of the <div> tag in HTML?

a)

The purpose of the

tag in HTML is to group and style HTML elements together.

b)

The purpose of the

tag in HTML is to display an image.

c)

The purpose of the

tag in HTML is to define a table.

d)

The purpose of the

tag in HTML is to create a hyperlink.