wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Review HHTML AND CSS

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following HTML tags is used to define a hyperlink?

a)

<link>

b)

<a>

c)

<href>

d)

<hyperlink>

2.

What does the <div> tag represent in HTML?

a)

A division of a document, used to group content.

b)

A definition of an image.

c)

A form control

d)

A text alignment option.

3.

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

a)

color

b)

background-color

c)

bg-color

d)

background-image

4.

Which of the following is the correct syntax to link an external CSS file in HTML?

a)

<style src="styles.css">

b)

<link rel="stylesheet" type="text/css" href="styles.css">

c)

<css src="styles.css">

d)

<script src="styles.css">

5.

True or False: The <span> tag is a block-level element.

a)

True

b)

False

6.

How do you apply a CSS style to an element with the ID "header"?

a)

#header {}

b)

.header {}

c)

header {}

d)

id="header" {}

7.

What is the default value of the position property in CSS?

a)

absolute

b)

relative

c)

static

d)

fixed

8.

Which CSS property is used to control the spacing between words in a text element?

a)

word-spacing

b)

letter-spacing

c)

line-height

d)

margin

9.

Which of the following tags is used to define an ordered list?

a)

<ul>

b)

<ol>

c)

<li>

d)

<dl>

10.

What does the alt attribute in an <img> tag do?

a)

Specifies the location of the image.

b)

Provides an alternative text for screen readers and when the image cannot be displayed.

c)

Specifies the size of the image.

d)

Makes the image appear as a background.

11.

 How do you create a comment in CSS?

a)

/* This is a comment */

b)

// This is a comment

c)

<!-- This is a comment -->

d)

# This is a comment

12.

Which of the following is the correct HTML5 tag for embedding a video?

a)

<media>

b)

<video>

c)

<embed>

d)

<audio>

13.

How do you select all <p> elements in a CSS file?

a)

.p

b)

#p

c)

p

d)

*p

14.

Which of the following is a valid CSS rule to set the text color to red?

a)

color = red;

b)

text-color: red;

c)

color: red;

d)

text-color: #ff0000;

15.

Which tag is used to define a table row in HTML?

a)

<tr>

b)

<td>

c)

<th>

d)

<table>

16.

#000000 Is black

a)

True

b)

False

17.

What is the purpose of the @media rule in CSS?

a)

To define media types for CSS.

b)

To create responsive designs for different screen sizes.

c)

To define background images.

d)

To import external CSS files.

18.

How do you change the font size of text in CSS?

a)

font-size: 14px;

b)

text-size: 14px;

c)

font: 14px;

d)

text-font-size: 14px;

19.

Which of the following tags is used to define (create) a form in HTML?

a)

<input>

b)

<form>

c)

<fieldset>

d)

<button>

20.

What is the function of the display property in CSS?

a)

Controls the visibility of an element.

b)

Defines the layout behavior of an element (block, inline, etc.).

c)

Changes the size of the element.

d)

Specifies the background color.