Web Design and PHP (PGDCA)
KERALA STATE RUTRONIX
Web Design and PHP
(PGDCA)
Question code: B4
Time : 2 hours
Maximum Marks : 100
(Note: Write the answers for Questions from 1 to 30 in the MCQ answer sheet)
Part -I Choose the most appropriate answer
(10 x 1 Mark = 10 Marks)
1) The correct HTML tag to make a text bold
a) <bb>
b) <bld>
c) <bold>
d) <b>
2) Which of the following is an invalid variable name in PHP?
a) $my_Var
b) $myVar
c) $my-Var
d) None of these
3) The correct HTML for adding a background color
a) <body bgcolor="yellow">
b) <body color="yellow">
c) <background> yellow </background>
d) None of these
4) HTML tag used to create unordered ist
a) <ul>
b) <ol>
c) <unordered>
d) None of these
5) Which of the following is not used to transmit data from an HTML form to server
a) get
b) post
c) send
d) None of these
6) Which of the following is the attribute of body tag
a) <hr>
b) <bold>
c) <bgcolor>
d) <table>
7) What is the correct HTML for inserting an image
a) <img> image.gif <img>
b) <img src = "image.gif">
c) <Img href = "image.gif">
d) None of these
8) In an HTML document, ................. appears in the very top line of the users browser
a) HEAD
b) BODY
c) TITLE
d) FORM
9) In HTML, ................ is an invisible character that takes up one sace
a) &
b) t
c) nbsp;
d) <br>
10) ................ stores multiple values in one single variable
a) array()
b) split()
c) array_splice ()
d) array_elem()
Part - II Fill in the blanks
(10 x 1 Mark = 10 Marks)
11) AIl PHP variable names must be prefixed with a .................
12) PHP is a ................. scripting language.
13) in HTML ..................attribute tells the browser how much space to include between the walls of the table and between individual cells
14) In Javascript ................. function will print the current webpage when executed
15) In HTML, hyperlinks are created using .................. tag
16) In PHP, concatenation operator is represented by ..............
17) <tr> <tr> tag can be placed within ................
18) ................... is the correct HTML element for inserting a line break
19) ................... character is used to indicate an end tag
20) ................. is the correct HTML for making a checkbox
Part- III State whether True or False
(10x1 Mark = 10 Marks)
21) JavaScript is a Client side scripting language
22) <Break> tag is used to break a line
23) PHP is only executed in LINUX
24) HTML is a case sensitive language
25) H6 is the smallest HTML heading tag
26) A CSS comment begins with "/*" and ends with "*/"
2) The set cookie function must appear before the <HTML> lag
28) In PHP, trim() function is used to remove all spaces in string
29) HTML is platform independent
30) HTML comments start with <!-- and end with -->
Part-IV Give the output of the codes given below
(5 x 2 Marks = 10 Marks)
31)
<? php
$colorArray=array("Red","Yellow","Green","blue","Indigo");
echo $color Array [2];
?>
32)
<?php
$i=1;
while($i<=5)
{ echo $i ;
$i++ ; }
?>
33)
<?php
$x=array ("one", "two", "three");
foreach ($x as $value)
{echo $value."<br/>";}
?>
34)
<?php
echo strlen ("Kerala Slate");
?>
35)
<?php
for ($i=8; $i<=10; $i++)
{ echo $i. "<br/>";}
?>
Part V Give Expansion of the following
(10 x 1 Mark 10 Marks)
36) PHP
37) HTML
38) CSS
39) SQL
40) URL
41) SVG
42 XML
43) FTP
44 HTTP
45) RWD
Part - VI Answer the following (Any Six)
(6 x 5 Marks = 30 Marks)
46) Explan frameset and their attributes in HTML
47) Write a Javascript code to redirect a page 5 seconds after the page is being loaded to another page "sample.php"
48) Wate any five date and time functions used in javascript.
49) Explain any five character formatting elements in HTML.
50) What is the difference between PHP Session and Cookie?
51) What is the difference between GET method and POST method in PHP
52) What are the various list elements in HTML?
53) Name five arithmetic operators in JavaScript and illustrate with examples
54) Explain the three parts in CSS syntax
Part - VII Answer the following (Any Two)
(2 x 10 Marks = 20 Marks)
55) Explain about external style sheet internal style sheet inline styles and multiple style
Sheets in CSS
56) Briefly explain about the different conditional statements and looping statements in PHP with suitable examples
57) Write a PHP program to display data stored in a table sorted by "age" column Table Name is employeeDetails and its structures as shown below
Column
|
Type
|
Name
|
Varchar(20)
|
Age
|
Int(5)
|
Salary
|
Int(10)
|
DOJ
|
Date
|
58)
(a) Write the PHP code to create an array named color Array and add values "Red" "Green" "Blue"
(b) Write the PHP code to insert a new item "White" at the end of the array
(c) Write the PHP code to insert new item "Purple" at the beginning of the array
Comments
Post a Comment