Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PT Prelim Exam

Total questions: 45

Worksheet time: 27mins

Name
Class
Date
1.

Create the correct HTML5 DOCTYPE declaration:

<! (a)   html>

2.

What does HTML stand for?

a)

Hyper Text Markup Language

b)

Hyperlinks and Text Markup Language

c)

Home Tool Markup Language

d)

Hyper Tool Multi Language

3.

Which HTML tag is used for the largest heading?

a)

<h1>

b)

<h6>

c)

<heading>

d)

<head>

4.

Which HTML tag is used for an unordered list?

a)

<ol>

b)

<ul>

c)

<li>

d)

<list>

5.

Which attribute is used to add alternative text to an image?

a)

text

b)

title

c)

src

d)

alt

6.

Which HTML tag is used to display a paragraph?

a)

<p>

b)

<para>

c)

<paragraph>

d)

<text>

7.

Which tag is used to make text bold?

a)

<b>

b)

<strong>

c)

<bold>

d)

Both <b> and <strong>

8.

What does CSS stand for?

a)

Colorful Style Sheets

b)

Creative Style Sheets

c)

Cascading Style Sheets

d)

Computer Style Sheets

9.

Which property is used to change the background color in CSS?

a)

bgcolor

b)

background-color

c)

color

d)

bg-color

10.

Which HTML tag is used to define an image?

a)

<img>

b)

<image>

c)

<pic>

11.

Which CSS property is used to change the text color?

a)

color

b)

font-color

c)

text-color

d)

fgcolor

12.

What is the correct HTML element for inserting a line break?

a)

<break>

b)

<lb>

c)

<br>

d)

<line>

13.

Which is the correct HTML element for inserting a horizontal rule?

a)

<hr>

b)

<break>

c)

<line>

d)

<rule>

14.

Which CSS property controls the spacing between letters?

a)

letter-spacing

b)

word-spacing

c)

spacing

15.

What is wrong in this HTML?

a)

No error

b)

The closing tag is incorrect. It should be </p>

c)

<p> cannot be used

d)

Missing attributes

16.

Find the error and write the correct code:

(a)  

17.
a)

Missing colon after property

b)

Missing semicolon

c)

Wrong property name

d)

Extra brackets

18.

Create a hyperlink to https://google.com with the text “Google”

(a)  

19.

Find the error and write the correct code:

(a)  

20.

Find the error and write the correct code:

(a)  

21.

Find the error and write the correct code:

(a)  

22.

Which CSS property changes the font family?

a)


font-family

b)


typeface

c)

font-type

d)

font

23.

In the CSS rule below, identify the selector, property, and value:

a)


Selector:
font-size;

Property: h2;

Value: 24px

b)

Selector: 24px; Property: h2;

Value: font-size

c)


Selector:
h2;

Property: font-size; Value: 24px

d)


Selector:
h2;

Property: 24px;

Value: font-size

24.

Which of the following is an example of inline CSS?

a)


<style> p { color: red; } </style>

b)


p { color: red; }

c)

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

d)

<p style="color: red;">Hello</p>

25.

Set the font size to 32 pixels.

(a)  

26.

Center-align the text using inline CSS.

(a)  

27.

Which of the following is NOT a way to add CSS to an HTML document?

a)


Inline CSS

b)

External CSS

c)

Server-side CSS

d)


Internal CSS

28.

What is the correct way to make all <p> tags have blue text using internal CSS

a)

b)

c)

29.

Which is the correct syntax to add an external CSS file named theme.css?

a)

b)

c)

d)

30.

Which code correctly creates an unordered list with three items?

a)

h1 style="color:red;">Heading</h1>

b)

c)

d)

31.

Which code correctly sets the background color of a page to lightblue using internal CSS?

a)

b)

c)

d)

32.

Which code correctly creates a CSS rule to change all links to green when hovered?

a)

b)

c)

33.

Which code correctly sets the font size of all paragraphs to 16px?

a)

b)

34.

What HTML5 element is used for navigation links?

a)

<navigate>

b)

<menu>

c)

<nav>

d)

<links>

35.

What HTML element is used to define the title of a document (shown in the browser’s tab)?

a)

<name>

b)

<title>

c)

<header>

d)

<heading>

36.

Which HTML code shows a

element with two links: Home and About?

a)

<nav>

<a>Home</a>

<a>About</a>

</nav>

b)


<nav href="#">

Home | About

</nav>

c)

<nav>

<a href="home.html">Home</a>

<a href="about.html">About</a>

</nav>

37.

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

a)

To define a table

b)

To define a dropdown list

c)

To define a description list

d)


To define a div layout

38.

What does the <dd> tag do in a description list?

a)

Describes the term defined by <dt>

b)

Defines a dropdown option

c)

Defines a data entry

d)

Defines a clickable button

39.

In which situation would you most likely use <dl>, <dt>, and <dd>?

a)

For creating form input fields

b)

For creating dropdown menus

c)

For organizing table rows

d)

For listing definitions or descriptions

40.

Where should the <title> tag be placed?

a)

Inside <body>

b)

Anywhere

c)

Inside <head>

d)

Outside <html>

41.

Which property changes the font size?

a)

font-family

b)

font-size

c)

text-size

d)

size

42.

Which property changes the width of an element

a)

height

b)

width

c)

size

43.

Which property changes the height of an element?

a)

height

b)

width

c)

size

44.

What is the difference between <ol> and <ul> in HTML?

a)

<ol> creates a numbered list, while <ul> creates a bulleted list.

b)

<ol> creates a bulleted list, while <ul> creates a numbered list.

c)

<ol> is used for headings, while <ul> is used for paragraphs.

d)

<ol> and <ul> do the same thing.

45.

Which HTML element is used to define the footer of a page?

a)

<footer>

b)

<foot>

c)

<end>

d)

<bottom>