wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML,CSS,SCRIPT QUIZZ

Total questions: 18

Worksheet time: 4mins

Name
Class
Date
1.

HTML stands for -

a)
  1. HighText Machine Language

b)

None of these

c)

HyperText Markup Language

d)

HyperText and links Markup Language

2.

The correct sequence of HTML tags for starting a webpage is -

a)

Head, Title, HTML, body

b)

HTML, Body, Title, Head

c)
  1. HTML, Head, Title, Body

d)

HTML, Head, Title, Body

3.

What does CSS stand for?

a)

Cascading Style Sheet

b)

Computer Style Sheet

c)

Colorful Style Sheet

d)

Creative Style Sheet

4.

Which tag is used to define an image in HTML?

a)

<img>

b)

<image>

c)

<picture>

d)

<imgsrc>

5.

What is the correct way to comment out code in HTML?

a)

<!-- This is a comment -->

b)

// This is a comment //

c)

/* This is a comment */

d)

** This is a comment **

6.

How to create a hyperlink in HTML?

7.

What is the correct way to create a list in HTML?

a)

<list>

b)

<ul>

c)

<ol>

d)

<li>

8.

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

a)

<br>

b)

<lb>

c)

<break>

d)

<line>

9.

What does HTML5 stand for?

a)

HyperText Markup Language 5

b)

HighTech Markup Language 5

c)

Hyperlink and Text Markup Language 5

d)

Highly Typed Markup Language 5

10.

Which type of JavaScript language is ___

a)

Object-Oriented

b)
  1. Assembly-language

c)

High-level

d)

Object-Based

11.

Which of the following is the correct output for the following JavaScript code:

  1. varx=5,y=1  

  2. var obj ={ x:10}  

  3. with(obj)  

  4. {  

  5.       alert(y)  

  6. }  

a)
  1. 1

b)

Error

c)

10

d)

5

12.

5. 

Which of the following methods can be used to display data in some form using Javascript?

a)

console.log()

b)

document.write()

c)

window.alert()

d)

All of the above

13.

 

What will be the output of the following code snippet?

<script type="text/javascript" language="javascript"> var a = "Scaler"; var result = a.substring(2, 4); document.write(result); </script>

a)

al

b)

ale

c)

cal

d)

caler

14.

What will be the output of the following code snippet?

<script type="text/javascript" language="javascript"> var x=12; var y=8; var res=eval("x+y"); document.write(res); </script>

a)

20

b)

x+y

c)

128

d)

None of the above

15.

What will be the output of the following code snippet?

(function(){ setTimeout(()=> console.log(1),2000); console.log(2); setTimeout(()=> console.log(3),0); console.log(4); })();

a)

1 2 3 4

b)

2 3 4 1

c)

4 3 2 1

d)

2 4 3 1

16.

What is the correct way to include an external CSS file in HTML?

a)

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

b)

<style src="styles.css">

c)

<css>styles.css</css>

d)

<external>styles.css</external>

17.

What is the purpose of the 'alt' attribute in an HTML image tag?

a)

To specify the alignment of the image

b)

To define the alternative text for the image

c)

To set the border color of the image

d)

To control the size of the image

18.

Which tag is used to create a hyperlink in HTML?

a)

<a href="http://www.example.com">Link</a>

b)

<link>http://www.example.com</link>

c)

<hyperlink>http://www.example.com</hyperlink>

d)

<url>http://www.example.com</url>