wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

FULLSTACK

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

What is the correct HTML element to define important text?

a)

 <strong>

b)

<b>

c)

<important>

d)

<i>

2.

How can you open a link in a new tab or window?

a)

 <a href="url" new>

b)

 <a href="url" target="_self">

c)

 <a href="url" target="_blank">

d)

 <a href="url" window="_blank">

3.

What is the correct way to make a text input field in HTML?

a)

<textinput>

b)

<input type="text">

c)

<input text>

d)

<textfield>

4.

Which tag is used to define a table in HTML?

a)

 <tab>

b)

<tr>

c)

<td>

d)

<table>

5.

The HTML

    tag is used for:

a)

Ordered lists

b)

Unordered lists

c)

Underlined lists

d)

Linked lists

6.

Which attribute is used to specify an alternate text for an image, if the image cannot be displayed?

a)

title

b)

src

c)

alt

d)

longdesc

7.

What is the purpose of the

tag in HTML?

a)

To create a division or a section in the document

b)

To create a bold text

c)

To create an image

d)

To define a table row

8.

Which tag is used to define an unordered list item?

a)
  • <ul>

b)

<li>

c)
  1. <ol>

d)
  1. <item>

9.

What does the tag in HTML define?

a)

Table header

b)

Table row

c)

Table data

d)

Table footer

10.

How can you make a numbered list?

a)

<list>

b)

<dl>

c)
  • <ul>

d)
  1. <ol>

11.

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

a)

font-style

b)

font-weight

c)

font-family

d)

font-type

12.

Which property is used to align text in CSS?

a)

text-align

b)

text-alignments

c)

align

d)

text-position

13.

How do you make the text bold using CSS?

a)

font-style: bold;

b)

text-style: bold;

c)

font-weight: bold;

d)

font-size: bold;

14.

Which CSS property is used to change the background image?

a)

background-image

b)

background-img

c)

background-picture

d)

img-background

15.

What is the correct syntax for including an external CSS file in HTML?

a)

<stylesheet> style.css </stylesheet>

b)


<style src="style.css">

c)

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

d)

<style link="style.css">

16.

How do you center a block element horizontally?

a)

text-align: center;

b)

margin: center;

c)

margin-left: auto; margin-right: auto;

d)

position: center;

17.

In CSS, the z-index property is used to:

a)

Add depth to text

b)

Specify the stacking order of elements

c)

Apply a zoom effect to images

d)

Indent text in a block

18.

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

a)

fixed

b)

relative

c)

absolute

d)

static

19.

Which of the following properties is used to add spacing inside an element?

a)

margin

b)

padding

c)

border

d)

outline

20.

What is the function of the display property in CSS?

a)

It hides elements

b)

It specifies how elements are displayed

c)

It changes the color of elements

d)

It adjusts the width of elements

21.

How can you add a JavaScript file to an HTML document?

a)

<script href="script.js">

b)

<script src="script.js">

c)

<script link="script.js">

d)

<link src="script.js">

22.

How do you create a function in JavaScript?

a)

function = myFunction()

b)

function myFunction()

c)

create myFunction()

d)

def myFunction()

23.

What is the output of 2 + 5 + "7" in JavaScript?

a)

"257"

b)

14

c)

"12"

d)

"77"

24.

Which method is used to find the length of a string in JavaScript?

a)

length()

b)

getLength()

c)

len()

d)

length

25.

Which of the following is the correct way to write a for loop in JavaScript?

a)

for (i = 0; i < 5; i++)

b)

for i = 1 to 5

c)

for (i <= 5; i++)

d)

for (i = 0; i <= 5)

26.

How do you round a number in JavaScript?

a)

Math.floor()

b)

Math.round()

c)

Math.ceil()

d)

round()

27.

In JavaScript, how do you find the largest number of 3 and 5?

a)

Math.max(3, 5)

b)

Math.largest(3, 5)

c)

Math.biggest(3, 5)

d)

Math.greatest(3, 5)

28.

How can you detect the type of a variable in JavaScript?

a)

typeof

b)

detectType

c)

variableType

d)

getType

29.

What does the typeof operator return for an array in JavaScript?

a)

"object"

b)

"array"

c)

"list"

d)

"undefined"

30.

Which JavaScript keyword is used to declare a constant?

a)

var

b)

let

c)

const

d)

constant