wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML,CSS AND JS QUIZ

Total questions: 50

Worksheet time: 29mins

Name
Class
Date
1.

HTML stands for -

a)
  1. HighText Machine Language

b)
  1. HyperText and links Markup Language

c)
  1. HyperText Markup Language

d)
  1. None of these

2.

Which sequence of HTML tags is correct?

a)
  1. <html><head></head><body></body></html>

b)
  1. <html><head><body></body></head></html>

c)
  1. <html><head></body></body></head></html>

d)
  1. <html><<head></head></body></body></html>

3.

Which of the following is not a container element?

a)

<p>

b)

<b>

c)

<ol>

d)

<hr>

4.

Which of the following tag identifies the document as an HTML document?

a)
  1. <HTML>

b)
  1. <HEAD>

c)
  1. <BODY>

d)
  1. <TAG>

5.

Container elements in HTML require   

a)
  1. starting tag

b)
  1. ending tag

c)
  1. starting and ending tags

d)
  1. None of the above

6.

Which types of tags are used by HTML?

a)
  1. tags only for hypertext

b)
  1. user defined tags

c)
  1. tags only for linking

d)
  1. fixed tags defined by the language

7.

Which of the following tag is used to make a list that lists the items with numbers?

a)

<dl>

b)

<ul>

c)

<ol>

d)
  1. None of these

8.

Which command should be use to link a page with HTML page? 

a)

<a link = “page.htm”> </a>

b)
  1. <a href = “page.htm”>page</a>

c)
  1. <a connect = “page.htm”></a>

d)
  1. <a attach = “page.htm”></a>

9.

To create a hyperlinked image

a)
  1. the image tag should be after the anchor tag

b)
  1. the image tag should be before the anchor tag

c)
  1. the anchor tag should be within image tag

d)
  1. the image tag should be within anchor tag

10.

Is it possible to link within the current page?

a)
  1. No

b)
  1. Only in framesets

c)
  1. Yes

d)
  1. None of these

11.

What is the correct way to enclose HTML tags?

a)

  1. curly brackets

b)

  1. square brackets

c)

  1. double quotes

d)

  1. angular brackets

12.

Which of the following is the proper way to apply the CSS code inside style.css to the home.html file?

a)

Inside home.html:


<head>

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

</head>

b)

Inside home.html:


<head>

<style href="style.css"></style>

</head>

c)

Inside style.css:


<html href="home.html">

d)

Inside style.css:


applyTo {

href: home.html;

}

13.

What are IFrames?

a)

Buttons that link to other websites

b)

Videos uploaded to your website

c)

The number of views your website has

d)

HTML pages embedded inside of other HTML pages

14.

True or False: It is possible to embed any website inside IFrames.

a)

True

b)

False

15.

What is the function of the div tag?

a)

To define a section of an HTML page

b)

To group a block of elements together to format them with CSS

c)

To efficiently apply the same style to several different elements

d)

All of the above

16.

Which of the following correctly uses div to style multiple elements the same way?

a)

<div class="intro">

<h2>Welcome</h2>

<p>Hi, welcome to my page.</p>

</div>

b)

<div>

<h2 class="intro">Welcome</h2>

<p class="intro">Hi, welcome to my page.</p>

</div>

c)

<div>

.intro{

font-size: 16px;

font-style: italic;

}

<h2>Welcome</h2>

<p>Hi, welcome to my page.</p>

</div>

d)

<h2 div class="intro">Welcome</h2>

<p div class="intro">Hi, welcome to my page.</p>

17.

What is the difference between <span> and <div>?

a)

<span> is better for styling text, while <div> is better for styling images

b)

<span> is for styling multiple elements, while <div> is for styling single elements at a time

c)

<span> is used to group and style inline elements, while <div> creates a line break

d)

<span> is used to style elements, while <div> is used to embed parts of other websites

18.

Which of the following selects all p tags with the class alert and makes them red?

a)

p.alert {

color: red;

}

b)

p {

.alert {

color:red;

}

}

c)

.alert p{

color: red;

}

d)

p alert{

color: red;

}

19.

How can I select all h1 tags that are immediate children of div tags?

a)

div h1 {

...

}

b)

div > h1 {

...

}

c)

div {

h1 {

...

}

}

d)

.h1 div {

...

}

20.

Which of the following will turn the h1 tag blue as the mouse hovers over it?

a)

hover > h1 {

color: blue;

}

b)

h1:hover {

color: blue;

}

c)

h1; hover {

color: blue;

}

d)

h1, hover {

color: blue;

}

21.

Which of the following will insert an exclamation point after every h2 element?

a)

h2:after {

content: “!”;

}

b)

h2:after {

content: !;

}

c)

h2::after {

content: “!”;

}

d)

h2::after {

content: !;

}

22.

Which of the following is not a property that can hide the visibility of an element?

a)

opacity

b)

hidden

c)

visibility

d)

display

23.

Which of the following defines border thickness so that the top and bottom borders are 10px thick and left and right borders are 5px thick?

a)

border: 5px 10px 5px 10px

b)

border: 5px 5px 10px 10px

c)

border: 10px 10px 5px 5px

d)

border: 10px 5px 10px 5px

24.

Which of the following applies the invert filter to all images with the class “inverted”?

a)

img.inverted {

filter: invert(0);

}

b)

img.inverted {

filter: invert;

}

c)

img inverted {

filter: invert(100%);

}

d)

img.inverted {

filter: invert(100%);

}

25.

Which of the following defines an animation change-color that changes the font color from green to red?

a)

@keyframes change-color {

from {color: green;}

to {color: red;}

}

b)

@animation change-color {

from {color: green;}

to {color: red;}

}

c)

@keyframes change-color {

color: {color: green, red;}

}

d)

@animation change-color {

color: {color: green, red;}

}

26.

To create items in defination list____ and _____tag are used

a)

<dt>

b)

<dd>

c)

<dm>

d)

<ol>

27.

The ______________tag is used to create a form.

a)

<input>

b)

<select>

c)

<form>

d)

<text area>

28.

List within another list is callled as_______________

a)

multiple

b)

multilevel

c)

order list

d)

nested list

29.

Client side image map can be created using two elements<area> and________

a)

<image>

b)

<map>

c)

coords

d)

<usemap>

30.

Which is the correct syntax for changing the text size?

a)

text-size: 75px;

b)

text-height: 75px;

c)

font-size: 75px;

d)

font-height: 75px;

31.

In CSS, h1 can be called as?

a)

Selector

b)

Value

c)

Attribute

d)

Tag

32.

____ has introduced text, list, box, margin, border, color, and background properties.

a)

html

b)

css

c)

ajax

d)

php

33.

Which of the following settings will not make an element invisible?

a)

visibility: hidden

b)

appearance: off

c)

opacity: 0

d)

display: none

34.

Which of the following defines an animation change-color that changes the font color from green to red?

a)

@keyframes change-color {

from {color: green;}

to {color: red;}

}

b)

@animation change-color {

from {color: green;}

to {color: red;}

}

c)

@keyframes change-color {

color: {color: green, red;}

}

d)

@animation change-color {

color: {color: green, red;}

}

35.

Javascript is _________ language.

a)

Programming

b)

Scripting

c)

Application

d)

applet

36.

JavaScript is designed for following purpose -

a)

To Style HTML Pages

b)

To Perform Server Side Scripting Opertion

c)

To add interactivity to HTML Pages.

d)

To Execute Query Related to DB on Server

37.

Local Browser used for validations on the Web Pages uses __________.

a)

HTML

b)

CSS

c)

js

d)

java

38.

Which of these is a loop?

a)

if(x<10)

b)

while(x<10)

c)

var x=10;

d)

text(x,10;10)

39.
A condition is __________.
a)
any expression that evaluates to True or False
b)
a built-in function that assigns a Boolean value to a variable
c)
a formula that is executed for a result
d)
an operand that indicates both conditions are True or False
40.
When drawing in Javascript, the coordinates for the top left of the screen is:
a)
0,400
b)
0,0
c)
400,0
d)
400,400
41.

Where do the <script></script> tags go in your document

a)

Within <img> tags

b)

In the <p></p> tags

c)

In the <title>

d)

In the <head> or <body>

42.
How do we generate a random number?
a)
Math.random()
b)
random.number()
c)
number.random()
d)
Random.math()
43.

Which of the following platform(s) can be used to run Javascript Code

a)

Google Chrome

b)

Firefox

c)

Microsoft Edge

d)

Safari

44.
How do I change the size of an image?
a)
width / height
b)
scale
c)
size
d)
shrink
45.

What is the correct syntax for referring to an external JavaScript script?

a)

<script src="myscript.js"></script>

b)

<script href="myscript.js"></script>

c)

<js href="myscript.js"></js>

d)

<js src="myscript.js"></js>

46.

How can you add a comment in a JavaScript?

a)

//This is comment

b)

'This is comment

c)

<!-- This is comment-->

47.

Why so Java and JavaScript have similar name?

a)

Java Script is a stripped-down version of Java

b)

The syntax of JavaScript is loosely based on Java syntax

c)

They both support Object Oriented Programming

d)

None of the above

48.

Which of the following is not a valid JavaScript variable name?

a)

2java

b)

_java_and_ java _names

c)

javaandjava

d)

None of the above

49.

Which of the following is correct to write “Hello World” on the web page?

a)

System.out.println(“Hello World”)

b)

print(“Hello World”)

c)

document.write(“Hello World”)

d)

response.write(“Hello World”)

50.

Which is the correct way to write a JavaScript array?

a)

var txt = new Array(1:"arr",2:"kim",3:"jim")

b)

var txt = new Array:1=(" arr ")2=("kim")3=("jim")

c)

var txt = new Array("arr ","kim","jim")

d)

var txt = new Array=" arr ","kim","jim"