wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PHP

Total questions: 19

Worksheet time: 13mins

Name
Class
Date
1.

Choose the appropriate tag to get the content in browser as follows:


<html>

<body>

______

Johny Johny!

Yes Papa

______

</body>

</html>


Johny Johny!

Yes Papa

(a)  

2.

HTML stands for

a)

Hyper Text Machine Language

b)

Hyper Text Markup Language

c)

Hyper Technical Machine Language

d)

None of these

3.

Choose the correct option About HTML elements

a)

Elements in HTML describes the way of presenting the content in the browser.

b)

All elements must have atleast one attribute associated with it.

c)

Element names are case in-sensitive

d)

None of the above

4.

Which one of the following is a form element?

a)

text box.

b)

radio button.

c)

submit button.

d)

All of these.

5.

Which one of the following is incorrect?

a)

<label> tag in HTML is used for creating a tag for form elements.

b)

id attribute is used with <label> to reduce the clickable area of form elements

c)

<label> can be used to increase the clickable area of buttons

d)

none of the above

6.

Choose the correct option.

a)

Default method in HTML is GET or POST

b)

Use of method attribute determines by which method the datas in the form will be submitted.

c)

Method can be POST or GET.

d)

Default method in HTML is GET.

7.

Which of the following tag is used for drop down list?

a)

<dropdown>

b)

<select>

c)

<option>

d)

<salect>

8.

Fill in the blanks with a suitable option in order to number items of an ordered list with small roman numbers.


<!DOCTYPE html>

<html>

<body>

<ol (a)   >

<li>

Physics

</li>

<li>

Chemistry

</li>

<li>

Mathematics

</li>

</ol>

</body>

</html>

9.

What is the default item marker in ordered lists of HTML?

a)

Circle

b)

Marker

c)

disc

d)

None of the above

10.

Which one of the following can be used to define the spacing between the cells of a table?

a)

border-spacing

b)

spacing

c)

cellspacing

d)

table-spacing

11.

How to insert a background image in HTML?

a)

<body background = "img.png">

b)

<img background = "img.png">

c)

<body style="background-image: url();">

d)

None of the above.

12.

Which HTML tag is used to display the power in expression, i.e., (x2 - y2)?

a)

<sub>

b)

<sup>

c)

<p>

d)

None of the above

13.
Choose PHP Conditional Operator from the list.
a)
?;
b)
:?
c)
??
d)
?/
14.
What is the output of the PHP code.?<br /><br /><?php<br /><br /> $a=0;<br /> $a = 5>2 ? print("4"): 3; <br /> print($a);<br />?>
a)
error
b)
14
c)
40
d)
41
15.

What is the output of the PHP code.

<?php

$a=0;

$a = 5>2 ?$b=6 : $b=8;

print("$a $a");?>

a)

6

b)

66

c)

68

d)

88

16.

What is the output of the PHP code.

<?php

if(4>5)

{print("Hurray..");}

print("yes");

?>

a)

Yes

b)

hurray..yes

c)

Hurray..Yes

d)

none of the above

17.

What is the output of the PHP code.

<?php

if(-5) {

print("Germany\n");

}


if(' ')


{ print("Texas\n"); }


printf("ZING");

?>

a)

ZING

b)

Germany ZING

c)

Germany Texas ZING

d)

error

18.

What will be the output of the following PHP code?

< ?php

$total = "25 students";

$more = "students 10";

$total = $total + $more;

echo "$total" ;?>

a)

Error

b)

35 students

c)

35

d)

25

19.
PHP Scripts starts with ________
a)
<php> … </php>
b)
<?php …. ?/>
c)
<?=........?>
d)
?php … ?php