wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

HTML, CSS & JS

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

1.Which of the following is the correct tag to create a text box?

a)

<input> text </input>

b)

<text>

c)

<input = “text”>

d)

<input type = “text”>

2.

2.What tag represents a line break?

a)

<br>

b)

<break>

c)

<space>

d)

<enter>

3.

Which of the following is the correct tag to create a submit button?

a)

<input type="submit"> Submit </button>

b)

<button type="submit"> Submit </button>

c)

<button type=Submit> “submit” </button>

d)

<button type=submit> Submit </button>

4.

In what attribute of the <form> tag is the form handler stated?

a)

method

b)

server

c)

action

d)

type

5.

Within what tags is the JavaScript code stated?

a)

<script> tag

b)

<javascript> tag

c)

<jscript> tag

6.

A paragraph is defined in HTML code.

<p id=“display”> </p>

What is the JavaScript code to change this paragraph?

a)

document.getElementById(“p").innerHTML = 'Hello World!’;

b)

document.getElementById("display").innerHTML = 'Hello World!’;

c)

display.innerHTML= 'Hello World!’;

d)

alert('Hello World!');

7.

What is the correct syntax to display a message in an alert box?

a)

alert(‘Hello World!’);

b)

alertbox(‘Hello World!’);

c)

msgprompt(‘Hello World!’);

d)

display(‘Hello World!’);

8.

How is a function created in JavaScript?

a)

function= function_name( ) { ..}

b)

function: function_name( ) { ..}

c)

function function_name( ) { ..}

9.

Which of the following represents the correct form of a conditional statement?

a)

If (a==10) then

b)

If (a=10)

c)

If (a=10) then

d)

If (a==10)

10.

A paragraph is defined in HTML code.

<p id=“display”> </p>

What is the JavaScript code to style this paragraph?

a)

document.getElementById(“display").style.color=“green";

b)

document.getElementById("display").innerHTML = ‘green’;

c)

document.getElementById(“p").style.color=“green";

d)

document.getElementById("display").innerHTML = ‘style: green’;

11.

Which of the following HTML tags represents the largest header?

a)

<head>

b)

<h1>

c)

<h2>

d)

<h3>

12.

Within which of the following HTML tags is the text that appears on the tab or window heading area specified?

a)

<head>

b)

<title>

c)

<a>

d)

<div>

13.

In which of the following methodology, is the CSS code specified within the ‘head’ tag?

a)

Inline CSS

b)

Internal CSS

c)

External CSS

14.

What tag is used to link an HTML code to a CSS code that is stored in a separate file?

a)

<a> tag

b)

<link> tag

c)

<style> tag

15.

What tag is used to specify CSS code in internal CSS methodology?

a)

<a> tag

b)

<link> tag

c)

<style> tag

16.

What is the correct code to specify background colour of an element?

a)

<p style=“background-color:red;”>

b)

<background>red</background>

c)

<p bg=“red”>

17.

What is the correct syntax to define a hyperlink?

a)

<a href=“location">link text</a>

b)

<a url=“location">link text</a>

c)

<a > location</a>

18.

Which of the following represents a table element only?

a)

<table> <body> < thead>

b)

<table> <row> <element>

c)

<table> <column> <element>

d)

<table> <tr> <td>

19.

What is the correct syntax to insert an image?

a)

<img src=“location” alt=“alternate text” >

b)

<img href=“location” alt=“alternate text” >

c)

<img src=“location”, “alternate text” >

d)

<img src=“location”, alt=“alternate text” >

20.

What HTML tag is used to create a bulleted list?

a)

<ol>

b)

<ul>

c)

<list>

d)

<li>

21.

In which section is the external CSS file referred to?

a)

<head>

b)

<body>

c)

<title>

d)

end of HTML file

22.

What is correct inline CSS code?

a)

<h1 style=“color:pink”; font-family:“arial”>

b)

<h1 style=“color=pink”: font-family=“arial”>

c)

<h1 “color=pink” and font-family=“arial”>

d)

<h1 “color:pink”; font-family:“arial”>

23.

What HTML tag is used to specify an element of a numbered list?

a)

<ol>

b)

<ul>

c)

<list>

d)

<li>

24.

What is correct internal CSS code?

a)

<p style=“color:pink”; font-family:“arial”>

b)

p {color: pink; font-family: arial}

c)

p {color=pink; font-family= arial}

d)

<p “color: pink; font-family: arial”>

25.

Which of the following symbols is used to define a class?

a)

Hash (#) symbol

b)

Period (.) symbol

c)

Defined within curly brackets