wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML

Total questions: 30

Worksheet time: 30mins

Name
Class
Date
1.

Frameset is used to

a)

load an image in the web page

b)

create a frame in the web page

c)

Divide a web page into frames

2.

How to use space in web page

a)

&nbsp

b)

&npsb

c)

None

3.

How to merge column in HTML table

a)

rowspan

b)

Colspan

c)

Colsmerge

4.

XHTML is case sensitive

a)

Yes

b)

NO

5.

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

a)

break

b)

br

c)

brk

6.

What is the correct HTML for creating a hyperlink?

a)

<a href="https://www.eec.com">EEC</a>

b)

<a url="https://www.eec.com">EEC</a>

c)

<a>https://www.eec.com>EEC</a>

7.

Which character is used to indicate an end tag?

a)

/

b)

>

c)

end

8.

How can you make a numbered list?

a)

OL

b)

NL

c)

NOL

9.

How can you make a bulleted list?

a)

BL

b)

UL

c)

NL

10.

HTML comments start with <!-- and end with -->

a)

True

b)

False

11.

Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

a)

alt

b)

hlp

c)

img

12.

What is the correct HTML element for playing video files?

a)

<video>

b)

<Movie>

c)

<media>

13.

Which

of the following tag is used to insert a line-break in HTML?

a)

<br>

b)

<break>

c)

<brk>

d)

<line-brake>

14.

The

<hr> tag in HTML is used for -

a)

Vertical

ruler

b)

New

Line

c)

new

paragraph

d)

horizontal

ruler

horizontal

ruler

15.

Which

of the following tag is used for inserting space in HTML?

a)

&nsp

b)

&nspace

c)

&nbsp

d)

&tab

16.

If

"padding: 10px 5px 20px 0px" is given. What does this represent?

a)

left:10px

, top:5px , right:20px , bottom:0px

b)

left:10px

, top:5px , right:20px , bottom:0px

c)

right:10px

, bottom:5px , left:20px , top:0px

d)

bottom:10px

, left:5px , top:20px , right:0px

17.

In

HTML5, which of the following tag is used to initialize the document type?

a)

<DOCTYPE

html>

b)

<!DOCTYPE

html>

c)

<!DOC

html>

d)

<!DOC

html>

18.

Which

of the following is the attribute that specifies additional horizontal space,

in pixels, to be reserved on either side of an embedded item like an iframe,

applet, image, and so on?

a)

hspace

b)

height

c)

hidefocus

d)

datasrc

19.

Which

of the option will be selected with the following code snippet?

<select>

<option selected value=”Audi”>Audi</option>

<option value=”selected”>Saab</option>

<option value=”opel”>selected</option>

<option value=”Fiat”>Fiat</option>

</select>

a)

Audi

b)

Selected

c)

Fiat

d)

Saab

20.

Which can generate HTML dynamically on the

client but can hardly interact with the web server to perform complex tasks

like database access and image processing etc. in JSP?

a)

Vs.JavaScript

b)

vs.Static

HTML

c)

Pure

Servlets

d)

vs.Server-Side

Includes

21.

Select

the correct among the following for linking an external style sheet

a)

<link

rel=“stylesheet” type=“text/css” href=“style.css”>

b)

<style

rel=“stylesheet” type=“text/css” href=“style.css”>

c)

<link>stylesheet

d)

<link

href=“style.css”>stylesheet

22.

What is

the correct representation to change the color of h2 element?

a)

h2 {

background-color: #008000 }

b)

{h2

background-color: #008000}

c)

h2.all{

background-color: #008000 }

d)

{h2.all

background-color: #008000}

23.

Which

of the following code creates an object?

a)

var

book = new Object()

b)

var

book = Object()

c)

var

book = Obj()

d)

var

book =new Obj()

24.

What

will be the output of the following JavaScript code? var string1 =

”123”;

var intvalue = 123;

alert( string1 + intvalue );

a)

123246

b)

123321

c)

321123

d)

123123

25.

Predict

the output of the following JavaScript code.<script

type="text/javascript">

a = 9 + "8";

document.write(a);

</script>

a)

17

b)

98

c)

Compilation

Error

d)

Error

26.

<script

type="text/javascript">

var a="GodisGreat";

var x=a.lastIndexOf("G");

document.write(x);

</script>

a)

5

b)

6

c)

7

d)

error

27.

<script

type="text/javascript" language="javascript">

var x=5;

var y=5;

var res=eval("x*y");

document.write(res);

</script>

a)

"25"

b)

25

c)

5*5

d)

"5*5"

28.

Predict

the output of the following JavaScript code.<script

type="text/javascript" language="javascript">

var a = "AlltheBest";

var result = a.substring(4, 5);

document.write(result);

</script>

a)

h

b)

t

c)

th

d)

he

29.

HTML stands for

a)

HyperText Markup Language

b)

HighText Machine Language

c)

HyperText and links Markup Language

d)

None of these

30.

Which of the following tag is used for inserting the largest heading in HTML?

a)

<h3>

b)

<h1>

c)

<h5>

d)

<h6>