wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Level 1

Total questions: 80

Worksheet time: 27mins

Name
Class
Date
1.

What is the primary function of the internet?

a)

To store data permanently

b)

To provide a network for communication and data exchange

c)

To create software applications

d)

To design websites

2.

What is a web browser?

a)

A type of server

b)

Software for accessing websites

c)

A type of internet connection

d)

A programming language

3.

Which of the following is NOT a component of a website?

a)

Web pages

b)

Links

c)

Email accounts

d)

Images

4.

Which of these roles is responsible for designing the layout and appearance of a website?

a)

Web Developer

b)

Web Designer

c)

Database Administrator

d)

Network Engineer

5.

What does HTML stand for?

a)

HyperText Markup Language

b)

HyperTransfer Media Language

c)

HyperText Multilayer Language

d)

Hyperlink Text Markup Language

6.

What is the purpose of the tag in an HTML document?

a)

To define the main content of the page

b)

To provide metadata and links to scripts and styles

c)

To display images

d)

To create hyperlinks

7.

What is the purpose of the src attribute in the tag?

a)

To specify the image source file

b)

To set the image size

c)

To add a title to the image

d)

To specify the image alt text

8.

Which attribute specifies how form data is sent to the server?

a)

action

b)

method

c)

name

d)

type

9.

Which input type would you use for a password field?

a)

text

b)

email

c)

password

d)

hidden

10.

What does the

tag represent in HTML?

a)

The navigation bar

b)

The main content section

c)

The bottom section of a page or section

d)

The top section of a page

11.

What is the purpose of the alt attribute in an tag?

a)

To specify the image source

b)

To provide alternative text for screen readers

c)

To define the image size

d)

To add a link to the image

12.

What does CSS stand for?

a)

Cascading Style Sheets

b)

Creative Style Sheets

c)

Custom Style Syntax

d)

Cascading Script Sheets

13.

Which CSS selector targets elements by their class name?

a)

#classname

b)

.classname

c)

classname

d)

*classname

14.

What is the purpose of selector in CSS?

a)

To define the HTML structure

b)

To specify which HTML elements to style

c)

To create web forms

d)

To link JavaScript functions

15.

How can you apply CSS styles to multiple elements using a class selector?

a)

.classname { property: value; }

b)

#classname { property: value; }

c)

classname { property: value; }

d)

element.classname { property: value; }

16.

What does the CSS box-sizing property do?

a)

It sets the dimensions of an element including padding and border

b)

It adjusts the border style of an element

c)

It changes the font size of text inside an element

d)

It controls the visibility of an element

17.

Which property defines the space between an element's content and its border?

a)

margin

b)

padding

c)

border

d)

content

18.

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

a)

absolute

b)

relative

c)

fixed

d)

static

19.

How do you center an element horizontally using CSS?

a)

margin: 0 auto;

b)

text-align: center;

c)

align-items: center;

d)

display: block; margin: 0 auto;

20.

What is Flexbox primarily used for in CSS?

a)

Grid layout

b)

Responsive design

c)

Aligning and distributing space among items in a container

d)

Typography

21.

What does the display: flex; property do?

a)

It defines the element as a flex container

b)

It makes the element fixed in position

c)

It sets the element to grid layout

d)

It makes the element invisible

22.

Which property controls the alignment of flex items along the main axis?

a)

align-items

b)

justify-content

c)

flex-direction

d)

align-content

23.

What is the purpose of the float property in CSS?

a)

To position an element relative to its normal position

b)

To make an element float above other elements

c)

To wrap text around an element

d)

To center an element horizontally

24.

What does position: absolute; do to an element?

a)

It positions the element relative to its nearest positioned ancestor

b)

It positions the element relative to the viewport

c)

It positions the element at the top of the page

d)

It positions the element relative to the document flow

25.

Which property specifies the number of columns in a CSS Grid?

a)

grid-template-rows

b)

grid-template-columns

c)

grid-area

d)

grid-gap

26.

What is the main goal of responsive web design?

a)

To optimize web pages for different screen sizes and devices

b)

To create static web pages

c)

To improve page loading speed

d)

To integrate multimedia content

27.

Which CSS feature is commonly used to apply different styles for different screen sizes?

a)

Media queries

b)

Pseudo-classes

c)

Flexbox

d)

Grid layout

28.

What unit would you use to create a layout that scales with the viewport width?

a)

px

b)

em

c)

vw

d)

pt

29.

Which of the following is a correct media query syntax to apply styles for screens wider than 600px?

a)

@media screen and (min-width: 600px) { ... }

b)

@media (width > 600px) { ... }

c)

@media (min-width: 600px) { ... }

d)

@media (screen: 600px) { ... }

30.

What does vh stand for in responsive design?

a)

Viewport height

b)

Viewport width

c)

Vertical height

d)

Vertical width

31.

Who created JavaScript?

a)

Brendan Eich

b)

Tim Berners-Lee

c)

Mark Zuckerberg

d)

James Gosling

32.

Which version of ECMAScript introduced arrow functions?

a)

ES5

b)

ES6

c)

ES7

d)

ES8

33.

Which of the following is NOT a data type in JavaScript?

a)

String

b)

Number

c)

Boolean

d)

Integer

34.

What does the let keyword do in JavaScript?

a)

Declares a variable with block scope

b)

Declares a variable with function scope

c)

Declares a constant

d)

Declares a global variable

35.

What is the result of 3 + '3' in JavaScript?

a)

6

b)

33

c)

NaN

d)

33

36.

Which statement is used to perform different actions based on conditions in JavaScript?

a)

switch

b)

for

c)

while

d)

function

37.

What is the purpose of the break statement in a loop?

a)

To exit the loop

b)

To skip the current iteration

c)

To restart the loop

d)

To pause the loop

38.

Which function declaration is correct in JavaScript?

a)

function myFunc() { ... }

b)

func myFunc() { ... }

c)

myFunc() function { ... }

d)

function: myFunc() { ... }

39.

What does the return keyword do in a function?

a)

Exits the function and optionally returns a value

b)

Calls the function

c)

Defines the function

d)

Sets a default value for parameters

40.

How do you create a for loop in JavaScript?

a)

for (initialization; condition; increment) { ... }

b)

loop (initialization; condition; increment) { ... }

c)

while (condition) { ... }

d)

repeat (initialization; condition; increment) { ... }

41.

What does the DOM represent?

a)

The Document Object Model

b)

The Data Output Module

c)

The Dynamic Object Model

d)

The Document Order Method

42.

Which method selects an element by its ID?

a)

getElementById()

b)

querySelector()

c)

getElementsByClassName()

d)

querySelectorAll()

43.

What is the purpose of the element in an HTML document?

a)

To contain metadata and links to scripts and stylesheets

b)

To display the main content of the page

c)

To create a footer for the page

d)

To define the navigation menu

44.

Which HTML tag is used to create a hyperlink?

a)

<link>

b)

<a>

c)

<href>

d)

<url>

45.

What does the z-index property control in CSS?

a)

The stacking order of elements

b)

The size of an element

c)

The visibility of an element

d)

The spacing between elements

46.

Which of the following is a valid HTML5 doctype declaration?

a)

DOCTYPE html

b)

!DOCTYPE html5

c)

HTML5 doctype

d)

!DOCTYPE HTML

47.

Which HTML element is used to define the footer of a document or section?

a)

<footer>

b)

<bottom>

c)

<section>

d)

<div>

48.

Which of the following is a method to convert a string to a number in JavaScript?

a)

parseInt()

b)

toNumber()

c)

convert()

d)

stringToNumber()

49.

What does the CSS display property control?

a)

The visibility of an element

b)

The layout behavior of an element

c)

The color of an element

d)

The size of an element

50.

Which HTML element is used to define an unordered list?

a)

<ol>

b)

<ul>

c)

<list>

d)

<li>

51.

Which of the following is a valid way to declare a constant in JavaScript?

a)

const myConst = 10;

b)

constant myConst = 10;

c)

let myConst = 10;

d)

var myConst = 10;

52.

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

a)

color

b)

background-color

c)

font-color

d)

text-color

53.

What will the following code output: console.log(typeof NaN);?

a)

number

b)

undefined

c)

NaN

d)

object

54.

What is the purpose of the

element in HTML?

a)

To create a form for user input

b)

To define the structure of a webpage

c)

To link external stylesheets

d)

To embed multimedia content

55.

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

a)

block

b)

inline

c)

none

d)

flex

56.

Which CSS property is used to control the layout of items in a CSS Grid container?

a)

grid-template-columns

b)

grid-template-areas

c)

grid-column

d)

grid-row

57.

Which responsive design technique adjusts the layout based on the viewport height?

a)

Viewport units

b)

Flexbox

c)

Media queries

d)

Grid layout

58.

What is the purpose of the position: sticky; property in CSS?

a)

It allows an element to stick to the top of the viewport when scrolling

b)

It positions an element relative to its normal position

c)

It makes an element fixed in place regardless of scrolling

d)

It floats an element to the left or right of its container

59.

Which of the following units is relative to the font size of the element?

a)

px

b)

pt

c)

em

d)

cm

60.

What is the main difference between CSS Grid and Flexbox?

a)

CSS Grid is one-dimensional, while Flexbox is two-dimensional

b)

CSS Grid is two-dimensional, while Flexbox is one-dimensional

c)

CSS Grid is used for positioning elements, while Flexbox is used for layout

d)

CSS Grid is only for responsive design, while Flexbox is not

61.

What property is used to align flex items along the main axis in a flex container?

a)

align-items

b)

justify-content

c)

flex-direction

d)

flex-wrap

62.

Which value of the flex-direction property arranges flex items in a column?

a)

row

b)

column

c)

row-reverse

d)

column-reverse

63.

What does the flex-grow property do in a flex container?

a)

Defines the ability for a flex item to grow relative to the rest

b)

Sets the initial size of a flex item

c)

Controls the order of flex items

d)

Defines the space between flex items

64.

What is the purpose of the clear property in CSS?

a)

To specify how elements should behave when they are floated

b)

To set the visibility of an element

c)

To define the stacking order of elements

d)

To adjust the margin of an element

65.

Which of the following values can be used with the float property?

a)

left

b)

right

c)

none

d)

All of the above

66.

What happens to a floated element in CSS?

a)

It is removed from the normal document flow

b)

It becomes fixed in position

c)

It is displayed as a block element

d)

It is hidden from view

67.

What does the CSS box model consist of?

a)

Content, padding, border, margin

b)

Content, padding, border, outline

c)

Content, margin, outline, shadow

d)

Content, padding, margin, shadow

68.

How does the margin property affect the layout of an element?

a)

It adds space inside the element

b)

It adds space outside the element

c)

It changes the background color of the element

d)

It adjusts the font size of the element

69.

Which property would you use to create space between the border and the content of an element?

a)

margin

b)

padding

c)

border-spacing

d)

gap

70.

What input type would you use for a checkbox in a form?

a)

text

b)

checkbox

c)

radio

d)

button

71.

What is the output of the following code: for(let i = 0; i < 5; i++) { console.log(i); }?

a)

0 1 2 3 4

b)

1 2 3 4 5

c)

0 1 2 3 4 5

d)

5

72.

Which loop will always execute at least once?

a)

for loop

b)

while loop

c)

do...while loop

d)

foreach loop

73.

What does the term 'media query' refer to in CSS?

a)

A method to apply styles based on device characteristics

b)

A way to query the server for data

c)

A function to manipulate media files

d)

A type of CSS selector

74.

What is the purpose of the 'if' statement in programming?

a)

To define a function

b)

To execute a block of code based on a condition

c)

To create a loop

d)

To declare a variable

75.

Which of the following correctly represents a switch statement in JavaScript?

a)

switch (expression) { case value: ... }

b)

switch { case value: ... }

c)

switch (value) { ... }

d)

case (value) switch { ... }

76.

What will be the output of the following code: let x = 10; if (x > 5) { console.log('Greater'); } else { console.log('Smaller'); }?

a)

Greater

b)

Smaller

c)

undefined

d)

Error

77.

What HTML tag is used to create a table?

a)

<table>

b)

<tab>

c)

<tbody>

d)

<tr>

78.

Which attribute is used to specify the width of a table in HTML?

a)

width

b)

size

c)

table-width

d)

colspan

79.

Which HTML element is used to define a section in a web page?

a)

<div>

b)

<article>

c)

<section>

d)

<container>

80.

What will the following JavaScript code output?

console.log('5' - 3);

a)

"5 - 3"

b)

2

c)

NaN

d)

"53"