wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML, CSS, Terminal & JavaScript

Total questions: 40

Worksheet time: 13mins

Name
Class
Date
1.

What is the purpose of HTML?

a)

To style web pages

b)

To structure web content

c)

To program web applications

d)

To manage databases

2.

Which CSS property is used to change the text color?

a)

color

b)

font-color

c)

text-color

d)

bgcolor

3.

Which one of the following is not a shell?

a)

Bash

b)

Zsh

c)

PowerShell

d)

None of the above

4.

What is the correct HTML element for inserting a line break?

a)

<lb>

b)

<break>

c)

<br>

d)

<line>

5.

What HTML tag is used to define an internal style sheet?

a)

<link>

b)

<style>

c)

<script>

d)

<css>

6.

We use git fork to clone a repository from Github

a)

False

b)

True

7.

How do you call a function named "myFunction" ?

a)

call myFunction()

b)

call function myFunction()

c)

myFunction()

d)

console.log(myFunction)

8.

Which HTML element is used to define the title of a document?

a)

<header>

b)

<title>

c)

<h1>

d)

<head>

9.

What is the purpose of the 'fetch' API?

a)

To send HTTP requests

b)

To manipulate the DOM

c)

To style elements

d)

To create functions

10.

What does CSS stand for?

a)

Computer Style Sheets

b)

Creative Style Sheets

c)

Cascading Style Sheets

d)

Colorful Style Sheets

11.

What command is used to display the current directory path in your terminal?

a)

path

b)

curdir

c)

presentdir

d)

pwd

12.

Which of the following is a self-closing tag in HTML?

a)

<p>

b)

<div>

c)

<br>

d)

<span>

13.

Which HTML tag is used to display a checkbox?

a)

<checkbox>

b)

<input type="checkbox">

c)

<check>

d)

<input-checkbox>

14.

What is the correct way to add a comment in HTML?

a)

// This is a comment

b)

/* This is a comment */

c)

<!-- This is a comment -->

d)

{ This is a comment }

15.

The do...while loop runs at least once

a)

True

b)

False

16.

How do you specify a favicon in an HTML document?

a)

<icon>

b)

<link rel="shortcut icon" href="favicon.ico">

c)

<meta icon="favicon.ico">

d)

<favicon>

17.

What is the default display property of the

tag?

a)

inline

b)

block

c)

inline-block

d)

flex

18.

How can you open a link in a new tab?

a)

<a href="page.html" target="_blank">

b)

<a href="page.html" target="newtab">

c)

<a href="page.html" newtab>

d)

<a href="page.html" open="new">

19.

What is the command to rename files in your terminal?

a)

<rm>

b)

<mv>

c)

<cp>

d)

<cd>

20.

What tag is used to create an unordered list?

a)

<ul>

b)

<ol>

c)

<li>

d)

<list>

21.

How do you apply a class in CSS?

a)

#classname {}

b)

.classname {}

c)

classname {}

d)

@classname {}

22.

How do you apply a CSS class to a HTML element?

a)

css="classname"

b)

style="classname"

c)

class="classname"

d)

id="classname"

23.

What is the correct way to apply an external CSS file?

a)

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

b)

<style src="style.css">

c)

<css href="style.css">

d)

<stylesheet>style.css</stylesheet>

24.

How can you make a font bold in CSS?

a)

font-bold: true;

b)

text-weight: bold;

c)

font-weight: bold;

d)

bold: yes;

25.

How do you write an if statement in JavaScript?

a)

if{condition}

b)

if(condition){}

c)

if[condition]{}

d)

if condition {}

26.

What is the default position property of an HTML element?

a)

absolute

b)

relative

c)

static

d)

fixed

27.

How do you apply flexbox to an element?

a)

display: flex;

b)

position: flex;

c)

align-flex: true;

d)

grid: flex;

28.

How do you add a single line comment in JavaScript?

a)

<!--comment-->

b)

/*comment*/

c)

// comment

d)

COMMENT

29.

How do you set a transition effect in CSS?

a)

animate: ease-in-out;

b)

transition: all 0.3s ease-in-out;

c)

effect: transition;

d)

move: smooth;

30.

newString ="" is pointing to a falsey value

a)

True

b)

False

31.

How do you declare a variable in JavaScript?

a)

variable x = 10;

b)

let x = 10;

c)

var x: 10;

d)

x = var 10;

32.

Which of the following is Not a JavaScript data type?

a)

Number

b)

Array

c)

Boolean

d)

Object

33.

What will typeof([]) return in JavaScript?

a)

object

b)

array

c)

list

d)

undefined

34.

What is an example of a variable lookup expression?

a)

5

b)

"Hello"

c)

x

d)

true

35.

Which of the following represents the strict inequality operator?

a)

!

b)

==

c)

==!

d)

!==

36.

What is the correct syntax for a function in JavaScript?

a)

def myFunction(){}

b)

function myFunction(){}

c)

function(){}

d)

create function myFunction(){}

37.

What will console.log(2 + "2") output?

a)

4

b)

22

c)

NaN

d)

Error

38.

Which function is used to convert a string to an integer?

a)

stringToInt()

b)

parseInt()

c)

convertToInteger()

d)

toInteger()

39.

Which of the following is the correct syntax for string interpolation in JavaScript?

a)

"Hello, ${name}"

b)

'Hello, ${name}'

c)

`Hello, ${name}`

d)

'Hello, &{name}'

40.

In JavaScript, 1 == "1"

a)


True

b)


False