wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

WEB I SEMESTER I - Final Test

Total questions: 50

Worksheet time: 11mins

Name
Class
Date
1.

What does HTML stand for?

a)

a) Hyperlinks and Text Markup Language

b)

b) Home Tool Markup Language

c)

c) Hyper Text Markup Language

d)
  1. d) Hyper Text Machine Language


2.

Which tag is used to create a hyperlink in HTML?

a)

a) <link>

b)

b) <a>

c)

c) <href>

d)

d) <hyperlink>

3.

What is the correct HTML element for the largest heading?

a)

a) <h6>

b)

b) <h1>

c)

c) <head>

d)

d) <heading>

4.

Which attribute is used to specify an alternate text for an image?

a)

a) title

b)

b) src

c)

c) alt

d)

d) href

5.

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

a)

a) To define a paragraph

b)

b) To provide metadata about the document

c)

c) To create a table

d)

d) To insert an image

6.

Which HTML element is used to define an internal style sheet?

a)

a) <css>

b)

b) <script>

c)

c) <style>

d)

d) <link>

7.

What is the correct HTML for inserting a background image?

a)

a) <body background="image.jpg">

b)

b) <background img="image.jpg">

c)

c) <body style="background-image:url('image.jpg')">

d)

d) <img src="image.jpg" background>

8.

Which HTML element is used to define a table row?

a)

a) <td>

b)

b) <tr>

c)

c) <th>

d)

d) <table>

9.

What is the correct HTML for creating a checkbox?

a)

a) <input type="check">

b)

b) <input type="checkbox">

c)

c) <checkbox>

d)

d)<check>

10.

Which HTML5 element is used to define a footer for a document or section?

a)

a) <footer>

b)

b) <bottom>

c)

c) <section>

d)

d) <div>

11.

What does CSS stand for?

a)

a) Computer Style Sheets

b)

b) Cascading Style Sheets

c)

c) Creative Style Sheets

d)

d) Colorful Style Sheets

12.

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

a)

a) color

b)

b) bgcolor

c)

c) background-color

d)

d) background

13.

How do you add a comment in CSS?

a)

a) // This is a comment

b)

b) <!-- This is a comment -->

c)

c) /* This is a comment */

d)

d) # This is a comment

14.

Which CSS property controls the text size?

a)

a) font-style

b)

b) font-size

c)

c) text-size

d)

d) text-style

15.

How do you select an element with the ID "header" in CSS?

a)

a) .header

b)

b) #header

c)

c) header

d)

d) *header

16.

Which CSS property is used to change the font of an element?

a)

a) font-family

b)

b) font-style

c)

c) font-weight

d)

d) font-type

17.

What is the default value of the position property in CSS?

a)

a) static

b)

b) relative

c)

c) fixed

d)

d) absolute

18.

Which CSS property is used to create space between the content and the border of an element?

a)

a) margin

b)

b) padding

c)

c) border-spacing

d)

d) spacing

19.

Which CSS property is used to make the text bold?

a)

a) font-weight

b)

b) text-bold

c)

c) font-style

d)

d) text-weight

20.

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

a)

a) <script href="script.js">

b)

b) <script src="script.js">

c)

c) <script name="script.js">

d)

d) <script file="script.js">

21.

How do you write "Hello World" in console?

a)

a) alertBox("Hello World");

b)

b) msg("Hello World");

c)

c) alert("Hello World");

d)

d) console.log("Hello World");

22.

Which of the following is NOT a JavaScript data type?

a)

a) String

b)

b) Boolean

c)

c) Number

d)

d) Float

23.

What is the correct way to write a JavaScript array?

a)

a) var colors = "red", "green", "blue";

b)

b) var colors = ["red", "green", "blue"];

c)

c) var colors = (1:"red", 2:"green", 3:"blue");

d)

d) var colors = "red", "green", "blue";

24.

Which operator is used to assign a value to a variable?

a)

a) =

b)

b) ==

c)

c) ===

d)

d) ->

25.

Which CSS property is used to create a responsive grid layout?

a)

a) display: flex;

b)

b) display: grid;

c)

c) display: inline-block;

d)

d) display: table;

26.

What does the z-index property in CSS control?

a)

a) The horizontal position of an element

b)

b) The vertical position of an element

c)

c) The stacking order of elements

d)

d) The opacity of an element

27.

Which method is used to add an element to the end of an array in JavaScript?

a)

a) push()

b)

b) pop()

c)

c) shift()

d)

d) unshift()

28.

What will the following code return: Boolean(10 > 9)?

a)

a) true

b)

b) false

c)

c) NaN

d)
  1. d) undefined

29.

How do you create a function in JavaScript?

a)

a) function:myFunction() {}

b)

b) function myFunction() {}

c)

c) function = myFunction() {}

d)
  1. d) function => myFunction() {}

30.

What is the main purpose of the return statement in a function?

a)

a) To stop the execution of a function

b)

b) To return a value from a function

c)

c) To define a variable

d)
  1. d) To call another function


31.

What is the output of typeof null in JavaScript?

a)

a) "null"

b)

b) "object"

c)

c) "undefined"

d)

d) "boolean"

32.

Which CSS pseudo-class is used to style an element when it is hovered?

a)

a) :hover

b)

b) :active

c)

c) :focus

d)
  1. d) :visited


33.

What is the output of console.log(1 + "2" + "2") in JavaScript?

a)

a) 122

b)

b) 32

c)

c) 14

d)
  1. d) 5

34.

Which HTML5 element is used to define a section of navigation links?

a)

a) <nav>

b)

b) <section>

c)

c) <header>

d)

d) <div>

35.

Which CSS property is used to create rounded corners?

a)

a) border-radius

b)

b) border-style

c)

c) border-width

d)
  1. d) border-color


36.

Which HTML tag is used to define an unordered list?

a)
  • A) <ol>

b)
  • B) <li>

c)
  • C) <ul>

d)
  • D) <list>

37.

Which attribute is used to specify an image source in HTML?

a)
  • A) href

b)

B) src

c)
  • C) alt

d)
  • D) source

38.

Which tag is used for line breaks in HTML?

a)

A) <br>

b)
  • B) <break>

c)
  • C) <lb>

d)
  • D) <hr>

39.

What is the default file extension for HTML files?

a)
  • A) .htl

b)

B) .html

c)
  • C) .web

d)
  • D) .htx

40.
  1. Which tag is used for tables in HTML?

a)
  • A) <grid>

b)
  • B) <table>

c)
  • C) <tab>

d)
  • D) <td>

41.
  1. What does the <title> tag define?

a)
  • A) The webpage name

b)
  • B) The heading text

c)
  • C) The URL

d)
  • D) The navigation bar

42.

Which is NOT a valid CSS unit?

a)
  • A) em

b)
  • B) vw

c)
  • C) sec

d)
  • D) rem

43.

Which CSS property changes text color? (10 sec)

a)
  • A) color

b)
  • B) text-color

c)

C) font-color

d)

D) text-style

44.

Which keyword declares a block-scoped variable?

a)
  • A) var

b)
  • B) let

c)
  • C) const

d)
  • D) define

45.
  1. How do you define a constant in JavaScript?

a)
  • A) const variable = value;

b)
  • B) constant variable = value;

c)
  • C) var variable = value;

d)
  • D) let variable = value;

46.
  1. How do you access the first element of an array arr in JavaScript? (10 sec)

a)
  • A) arr[1]

b)
  • B) arr[0]

c)
  • C) arr.first()

d)
  • D) arr[0]()

47.
  1. Which JavaScript statement is used to terminate a loop or switch? (10 sec)

a)
  • A) stop

b)
  • B) exit

c)
  • C) break

d)
  • D) continue

48.
  1. Which method checks if a string contains a substring? (10 sec)

a)
  • A) includes()

b)
  • B) indexOf()

c)
  • C) match()

d)
  • D) contains()

49.
  1. What will the expression false && true evaluate to? (10 sec)

a)
  • A) false

b)
  • B) true

c)
  • C) undefined

d)
  • D) error

50.
  1. What is the result of true || false? (10 sec)

a)
  • A) false

b)
  • B) true

c)
  • C) undefined

d)
  • D) null