Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML & CSS Basics

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

What does HTML stand for?

a)

Hyper Transfer Markup Language

b)

Hyper Text Markup Language

c)

High Tech Markup Language

d)

Hyperlink and Text Management Language

2.

Which HTML tag is used to define a paragraph?

a)

<para>

b)

<paragraph>

c)

<pg>

d)

<p>

3.

Which HTML tag is used for inserting an image?

a)

<img>

b)

<image>

c)

<picture>

d)

<photo>

4.

How do you create a hyperlink in HTML?

a)

<a href="https://example.com">Click Here</a>

b)

<link src="https://example.com">Click Here</link>

c)

<href url="https://example.com">Click Here</href>

d)

<hyperlink="https://example.com">Click Here</hyperlink>

5.

Which tag is used to create a table in HTML?

a)

<tab>

b)

<table>

c)

<tr>

d)

<td>

6.

What is the correct way to add a background color in HTML?

a)

<body background="blue">

b)

<body bgColor="blue">

c)

<body style="background-color: blue;">

d)

<background> blue</background>

7.

Which tag is used to create a line break in HTML?

a)

<lb>

b)

<break>

c)

<newline>

d)

<br>

8.

What is the correct way to create an ordered list?

a)

<ul>

<li>

Item

</li>

</ul>

b)

<ol>

<li>

Item

</li>

</ol>

c)

<list>

<li>

Item

</li>

</list>

d)

<order>

<li>

Item

</li>

</order>

9.

Which tag is used to define a heading in HTML?

a)

<head>

b)

<h>

c)

<heading>

d)

<h1> to <h6>

10.

Which attribute is used to open a link in a new tab?

a)

target="_self"

b)

target="_blank"

c)

newtab="true"

d)

open="new"

11.

What is the correct way to add a comment in HTML?

a)

// This is a comment

b)

/* This is a comment */

c)

<!-- This is a comment -->

d)

# This is a comment

12.

What does CSS stand for?

a)

Computer Style Sheets

b)

Creative Style System

c)

Cascading Style Sheets

d)

Colorful Style Sheets

13.

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

a)

In the <head> section

b)

In the <body> section

c)

At the end of the document

d)

Inside the <footer>

14.

How do you apply a CSS rule to all <p> elements?

a)

#p { color: blue; }

b)

.p { color: blue; }

c)

p.all { color: blue; }

d)

p { color: blue; }

15.

Which HTML tag is used to define a table row?

a)

<table>

b)

<tr>

c)

<td>

d)

<tab>

16.

Which HTML tag is used for the largest heading?

a)

<h1>

b)

<h6>

c)

<header>

d)

<h7>

17.

How do you add an external CSS file to an HTML page?

a)

<style src="styles.css">

b)

<css href="styles.css">

c)

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

d)

<stylesheet>styles.css</stylesheet>

18.

Which HTML tag is used to define an unordered list?

a)

<ul>

b)

<ol>

c)

<list>

d)

<li>

19.

What type of element is the <div> tag in HTML?

a)

Inline

b)

Block

c)

Inline-block

d)

None of the above

20.

What is the default display property of a <span> element?

a)

Block

b)

Inline

c)

Inline-block

d)

None

21.

Which of the following elements are block-level elements by default?

a)

<div>

b)

<p>

c)

<h1>

d)

All of the above