wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML, CSS, JavaScript, and PHP Quiz

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What attribute specifies the destination address of a hyperlink?

a)

link

b)

href

c)

src

d)

target

2.

Which of the following is not an HTML list type?

a)

Ordered list

b)

Definition list

c)

Hyperlink list

d)

Unordered list

3.

Which CSS property controls the text color?

a)

font-color

b)

color

c)

text-color

d)

background-color

4.

In CSS, which symbol is used to select all elements inside a specific element?

a)

>

b)

+

c)

*

d)

#

5.

Which event occurs when a user clicks on an HTML element?

a)

onload

b)

onmouseover

c)

onclick

d)

onchange

6.

Which method is used to write HTML output using JavaScript?

a)

console.log()

b)

print()

c)

document.write()

d)

echo()

7.

Which JavaScript keyword declares a block-scoped variable?

a)

var

b)

let

c)

static

d)

new

8.

What is the purpose of a tag in HTML?

a)

To display metadata on a webpage

b)

To define data about a document

c)

To create hyperlinks

d)

To style elements

9.

Which PHP function is used to output text?

a)

print()

b)

write()

c)

show()

d)

display()

10.

Which PHP function is used to find the length of a string?

a)

strlength()

b)

strlen()

c)

count()

d)

size()

11.

Which MySQL command is used to add new data to a table?

a)

INSERT INTO

b)

ADD TO

c)

APPEND

d)

NEW RECORD

12.

Which of the following is a valid PHP variable name?

a)

$9name

b)

$_name

c)

$-name

d)

$name#

13.

What is the default method used by HTML forms if the method attribute is not specified?

a)

GET

b)

POST

c)

REQUEST

d)

FETCH

14.

Which MySQL statement is used to remove a table from a database?

a)

DELETE TABLE

b)

REMOVE TABLE

c)

DROP TABLE

d)

DESTROY TABLE

15.

Which tag is used to insert a horizontal line in HTML?

a)

<line>

b)

<hr>

c)

<br>

d)

<hline>