wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML Quiz Week 1-2

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which tag encloses the entire HTML document?

a)

<head>

b)

<html>

c)

<Body>

d)

<div>

2.

What is the primary purpose of the <head> element?

a)
  1. To display content in the browser window

b)
  1. To contain metadata and references to scripts or styles

c)
  1. To define the site’s footer

d)
  1. To wrap all visible text

3.

Where should all visible page content appear?

a)
  1. Inside <html> but outside <body>

b)
  1. Inside

  1. <head>

c)
  1. Inside

  1. <body>

d)
  1. Inside

  2. <title>

4.

Which tag defines a paragraph block?

a)

<div>

b)

<p>

c)

<span>

d)

<section>

5.

What is the function of the <br>
tag?

a)
  1. Inserts a blank paragraph

b)
  1. Creates a line break within text

c)
  1. Begins a new line

d)
  1. pushes down the next line of text

6.

What type of list does <ul>

  • create?

a)
  1. Ordered list

b)
  1. Definition list

c)
  1. Unordered list

d)
  1. Nested list

7.

How will items in an <ol>

  1. element be displayed by default?

a)
  1. 1. First

  2. 2. Second

b)
  1. As 1. First 2. Second

c)
  1. As numbers

d)
  1. With checkboxes

8.

What does this code produce?

a)
  1. A numbered bullet list with fruits only

b)
  1. A numbered list inside a single bullet list item

c)
  1. Two separate lists side by side

d)
  1. Invalid HTML

9.

Identify the mistake in this snippet.

a)
  1. <ul> should be <ol>

b)
  1. Missing closing </li> for “Two”

c)
  1. Should use <p>

    instead of <li>

d)
  1. Lists cannot nest

10.

What does type="a" do in the <ol>

  1. tag?

a)
  1. Starts numbering at “a” lowercase letters

b)
  1. Applies Arial font

c)
  1. Adds anchors to each item

d)
  1. Creates an alphabetical bullet list

11.

Which attribute in <img> specifies the path to the image file

a)

alt

b)

src

c)

href

d)

link

12.

What important attribute is missing from this image tag?

a)

title

b)

alt

c)

width

d)

caption

13.

Which of these is not required for an accessible <img> tag?

a)

src

b)

alt

c)

width

d)

all are required

14.

How many block-level paragraphs will appear?

a)
  1. One

b)
  1. Two

c)
  1. Zero

d)
  1. Depends on CSS

15.

What will this render?

a)
  1. Line1Line2 on same line

b)
  1. Line1, two blank lines, then Line2

c)
  1. A numbered list

d)
  1. An error

16.

Which tag correctly ends the list?

a)

</li>

b)

</ul>

c)

</ol>

d)

</list>

17.

What is wrong with this structure?

a)
  1. You can’t nest <ul>

    • inside <p>

b)

Missing <head> tag

c)
  1. <ul> requires type attribute

d)
  1. <p> must contain only text

18.

Which element is self-closing in this snippet?

a)

<head>

b)

<meta>

c)

<body>

d)

<html>

19.

Identify the error in the <ul>

  • segment.

a)
  1. Missing closing

  1. </ul>

b)
  1. <li> tag not closed for “Water”

c)

Cannot have two lists in one body

d)
  1. <ul> must be inside

<head>

20.

Which two tags are mandatory for a valid HTML5 document?

a)

<html> and <body>

b)

<head> and <title>

c)

<html> and <!DOCTYPE html>

d)

<body> and <p>