wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML and CSS Basics

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.

What does HTML stand for?

a)

HyperText Markup Protocol

b)

HyperText Markup Language

c)

Hyperlink Text Markup Language

d)

HighText Markup Language

2.

What does CSS stand for?

a)

Cascading Syntax Sheets

b)

Creative Style Sheets

c)

Cascading Style Scripts

d)

Cascading Style Sheets

3.

How do you add a background color in CSS?

a)

Use the CSS property 'color: background;'.

b)

Set the background color with 'bg-color: blue;'.

c)

Apply 'background: color;'.

d)

Use the CSS property 'background-color: color;'. For example, 'background-color: red;'.

4.

Which CSS property is used to change the text color?

a)

font-size

b)

background-color

c)

color

d)

text-align

5.

What is the purpose of the 'float' property in CSS?

a)

To set the display type of an element.

b)

To create a fixed position for an element.

c)

To change the opacity of an element.

d)

To align elements horizontally or vertically.

6.

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

a)

<script>

b)

<css>

c)

<style>

d)

<link>

7.

What does the 'z-index' property in CSS control?

a)

The stacking order of elements.

b)

The size of an element.

c)

The visibility of an element.

d)

The margin space around an element.

8.

Which CSS property is used to control the spacing between lines of text?

a)

line-height

b)

letter-spacing

c)

text-indent

d)

margin

9.

What is the function of the 'display' property in CSS?

a)

To set the visibility of an element.

b)

To define how an element is displayed on the page.

c)

To adjust the size of an element.

d)

To change the font style of an element.

10.

Which HTML element is used to create a hyperlink?

a)

<link>

b)

<a>

c)

<url>

d)

<href>

11.

What is the purpose of the 'margin' property in CSS?

a)

To set the font size of an element.

b)

To create space around elements.

c)

To control the background image of an element.

d)

To define the border of an element.

12.

Which HTML element is used to define a table?

a)

<tr>

b)

<tbody>

c)

<tab>

d)

<table>

13.

What does the 'opacity' property in CSS control?

a)

The transparency level of an element.

b)

The position of an element.

c)

The color of an element.

d)

The size of an element.

14.

Which HTML element is used to create a list?

a)

<list>

b)

<ol>

c)

<ul>

d)

<li>

15.

What is the purpose of the 'padding' property in CSS?

a)

To control the background color of an element.

b)

To create space inside an element's border.

c)

To set the font style of an element.

d)

To define the border of an element.

16.

Which HTML tag is used to define an image?

a)

<picture>

b)

<src>

c)

<img>

d)

<image>

17.

Which HTML element is used to create a form?

a)

<form>

b)

<fieldset>

c)

<input>

d)

<submit>