Web Development Past Question
Web Development Past Question
You can add names to each frame window using the setting
…………..
a. src
b. href
a. url
b. name
c. none
12. How do you change the text color of an element using CSS?
a. text-color:
b. color:
c. text-color=
d. font-color:
15.How do you make each word in a text start with a capital letter?
a. text-transform:uppercase
b. text-transform:capitalize
c. You can't do that with CSS
d. text-transform:capitalize
18. How do you display a border like this: The top border = 10 pixels, The
bottom border = 5 pixels, The left border = 20 pixels, The right border
= 1pixel?
a. border-width:10px 20px 5px 1px
b. border-width:10px 1px 5px 20px
c. border-width:10px 5px 20px 1px
d. border-width:5px 20px 10px 1px
3
4
20.Which of this is the correct XHTML for a list?
a. <li></Li>
b. <li><li>
c. <li></li>
d. <LI></LI>
21.What is a correct XHTML tag for a line break?
a. <break/>
b. <br />
c. </br>
d. <break>
e. <BR>
22.What is the correct XHTML code for an attribute and its value?
a. TYPE="text/css"
b. type=text/css
c. type="text/css"
d. Type=text/css
e. type:text/css
5
d. None
e. All of the above
26.In writing XHTML the opening and closing tags should start and end with
XHTML
d. True
e. False
27. Cascading Style Sheets (CSS) can be defined for entire website by simply
writing the CSS definitions
a. As Plain Text document
b. In the Head section of each page
c. In the Body section of each page
d. None
e. All of above
28.In CSS, which of the following options do you have for changing text
color?
a. Common name and Hexcolor only
b. Common name, RBG value, Hexcolor
c. RBG value, Hexcolor
d. Hexcolor only
e. Common name only
29. Which of the following is NOT a valid CSS selector?
a. ID selectors
b. TAG selectors
c. Title selectors
d. HEAD selectors
e. none of the above
6
31.In CSS, what does the font-style property apply to text?
a. Different colors
b. Bigger
c. Italic
d. All the above
e. None
38.Tags and text that do not show directly on the page are placed in the
a. Head
b. Body
c. Tables
d. Title
e. text
39.What of the following is the file extension used for HTML file ?
a. hmt
b. htlm
c. hmtl
d. doc
e. htm
8
d. bigger and smaller
44.To add rows to your tables, which of the following tags can be used?
a. <tr> and </td>
b. <cr> and </cr>
c. <th> and </th>
d. <tr> and </tr>
46.To define the space between the element's border and content, you use the
padding property, but are you allowed to use negative values?
a. Yes
b. No
47. How do you make a list that lists its items with squares?
a. type: square
b. list-style-type: square
c. list-type: square
d. style-list: square
48.20. What is the correct HTML for referring to an external style sheet?
a. <link rel="stylesheet" type="text/css" href="mainstyle.css">
b. <style src="mainstyle.css">
c. <stylesheet>mainstyle.css</stylesheet>
d. <link url="stylesheet" type="text/css" href="mainstyle.css">
9
d. Use the ID selector with > delimiter
50.What selector should you use when applying a style to multiple elements?
a. ID
b. Class
c. Type
d. Any of the above
10
57.Which network protocol was the Web developed to run on
a. TCP
b. IP
c. WAN
d. LAN
e. TCP/IP
60.If you don’t want the frame windows to be resizeable, simply add what to the <frame>
lines ?
a. Save
b. dontresize
c. resize
d. size
e. Noresize
61.How can you make a list that lists the items with numbers?
a. <dl>
b. <lo>
c. <ul>
d. <ol>
11
e. <list>
65. What is the correct HTML tag for inserting a line break?
a. <lb />
b. <br />
c. <break />
d. <bl/>
12
XHTML
True
False
False
True
True
False
</p><p>
<P></p>
<p></p>
<P></P>
<br />
<br>
<break/>
WIDTH="80"
width="80"
width=80
WIDTH=80
13
8. All elements in XHTML must be closed
True
False
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
<li>Milk</li>
</ul>
Yes
No
False
True
False
True
14. Which of the following is the right use of the lang attribute?
14
<div language="en">Hello World!</div>
The id attribute
None
No
Yes
Yes
No
Transitional
Normal
Loose
Frameset
True
False
15
HTML
Microsoft
Netscape
<h1>
<head>
<h6>
<heading>
<break>
<lb>
<br>
<background>yellow</background>
<body color="yellow">
<body bgcolor="yellow">
<bld>
<bb>
<bold>
<b>
<ii>
16
<italics>
<i>
<a href="http://www.w3schools.com">W3Schools</a>
<a>http://www.w3schools.com</a>
<a name="http://www.w3schools.com">W3Schools.com</a>
<a url="http://www.w3schools.com">W3Schools.com</a>
<a href="mailto:xxx@yyy">
<mail href="xxx@yyy">
<a href="xxx@yyy">
<mail>xxx@yyy</mail>
<table><tr><td>
<table><tr><tt>
<thead><body><tr>
<table><head><tfoot>
12. Choose the correct HTML to left-align the content inside a tablecell
<td align="left">
<tdleft>
<td leftalign>
<td valign="left">
13. How can you make a list that lists the items with 1, 2, 3...?
<ul>
<ol>
17
<list>
<dl>
14. How can you make a list that lists the items with circles?
<ul>
<ol>
<list>
<dl>
<input type="checkbox">
<input type="check">
<checkbox>
<check>
<input type="textfield">
<input type="text">
<textinput type="text">
<textfield>
<select>
<input type="dropdown">
<input type="list">
<list>
<input type="textarea">
<textarea>
<input type="textbox">
<img>image.gif</img>
<img src="image.gif">
18
<image src="image.gif">
<img href="image.gif>
<background img="background.gif">
<body background="background.gif">
CSS
<style src="mystyle.css">
<stylesheet>mystyle.css</stylesheet>
3. Where in an HTML document is the correct place to refer to an external style sheet?
<script>
<css>
<style>
class
style
19
styles
font
{body:color=black(body}
{body;color:black}
body:color=black
/* this is a comment */
// this is a comment
// this is a comment //
color:
background-color:
bgcolor:
h1.all {background-color:#FFFFFF}
all.h1 {background-color:#FFFFFF}
h1 {background-color:#FFFFFF}
fgcolor:
text-color:
text-color=
color:
text-size
font-size
text-style
20
font-style
12. What is the correct CSS syntax for making all the <p> elements bold?
<p style="text-size:bold">
p {text-size:bold}
<p style="font-size:bold">
p {font-weight:bold}
a {decoration:no underline}
a {text-decoration:none}
a {underline:none}
a {text-decoration:no underline}
14. How do you make each word in a text start with a capital letter?
text-transform:capitalize
text-transform:uppercase
font=
font-family:
f:
font:b
font-weight:bold
style:bold
21
border-width:5px 20px 10px 1px
margin-left:
text-indent:
margin:
indent:
19. To define the space between the element's border and content, you use the padding
property, but are you allowed to use negative values?
Yes
No
20. How do you make a list that lists its items with squares?
type: square
list-type: square
type: 2
list-style-type: square
JAVA SCRIPT
<script>
<js>
<javascript>
<scripting>
("Hello World")
document.write("Hello World")
"Hello World"
22
response.write("Hello World")
Both the <head> section and the <body> section are correct
4. What is the correct syntax for referring to an external script called "xxx.js"?
<script href="xxx.js">
<script name="xxx.js">
<script src="xxx.js">
False
True
alert("Hello World")
alertBox="Hello World"
alertBox("Hello World")
msgBox("Hello World")
function myFunction()
function:myFunction()
function=myFunction()
myFunction()
call myFunction()
9. How do you write a conditional statement for executing some statements only if "i" is equal
to 5?
if (i==5)
if i=5 then
23
if i=5
if i==5 then
10. How do you write a conditional statement for executing some statements only if "i" is NOT
equal to 5?
if =! 5 then
if (i <> 5)
if <>5
if (i != 5)
3. The "for" loop, the "while" loop, and the "do...while" loop
4. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop
for (i = 0; i <= 5)
for i = 1 to 5
<!--This is a comment-->
'This is a comment
//This is a comment
14. What is the correct JavaScript syntax to insert a comment that has more than one line?
24
var txt = new Array:1=("tim")2=("kim")3=("jim")
16. How do you round the number 7.25, to the nearest whole number?
Math.rnd(7.25)
rnd(7.25)
round(7.25)
Math.round(7.25)
top(2,4)
Math.ceil(2,4)
Math.max(2,4)
ceil(2,4)
18. What is the correct JavaScript syntax for opening a new window called "window2" ?
new("http://www.w3schools.com","window2")
new.window("http://www.w3schools.com","window2")
open.new("http://www.w3schools.com","window2")
window.open("http://www.w3schools.com","window2")
navigator.appName
client.navName
browser.name
25
XML
X-Markup Language
True
False
4. What is the correct syntax of the declaration which defines the XML version?
<?xml version="1.0"?>
Do The Dance
<?xml version="1.0"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
No
Yes
26
7. Is this a correct XML document?
<?xml version="1.0"?>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
Yes
No
True
False
<?xml version="1.0"?>
<note>
<to age="29">Tove</to>
<from>Jani</from>
</note>
No
Yes
<?xml version="1.0"?>
<note>
<to age=29>Tove</to>
<from>Jani</from>
</note>
27
No
Yes
False
True
<h1>
<1dollar>
<Note>
<age>
<first name>
<NAME>
<phone number>
<xmldocument>
<7eleven>
True
False
28
<?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>
20. For the XML parser to ignore a certain section of your XML document, which syntax is
correct?
PHP QUIZ
1. What does PHP stand for?
You answered:
PHP: Hypertext Preprocessor
Correct Answer!
7. How do you get information from a form that is submitted using the "get" method?
You answered:
$_GET[];
Correct Answer!
8. When using the POST method, variables are displayed in the URL:
You answered:
False
Correct Answer!
29
9. In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
You answered:
True
Correct Answer!
13. What is the correct way to open the file "time.txt" as readable?
You answered:
fopen("time.txt","r");
Correct Answer!
19. In PHP, the die() and exit() functions do the exact same thing.
You answered:
True
Correct Answer!
30
1) What does HTML stand for?
a) Home Tool Markup Language
b) Hyperlinks and Text Markup Language
c) Hyper Text Markup Language
6) JavaScript and PHP are both called ____ because code for both languages
is embedded in a Web page.
a) programming languages
b) embedded scripting languages
c) development environments
d) database management system tools
31
7) HTML formatting instructions are called
a) code
b) commands
c) mark up languages
d) tags
13) What is the correct HTML for adding a yellow background color to a web
page?
a) <body bgcolor="yellow">
b) <body color="yellow">
32
c) <background>yellow</background>
18) Choose the correct HTML to left-align the content inside a tablecell
a) <td valign="left">
b) <td align="left">
c) <tdleft>
d) <td leftalign>
19) How can you make a list that lists the items with numbers?
a) <ul>
b) <ol>
c) <dl>
d) <list>
20) How can you make a list that lists the items with bullets?
a) <ul>
b) <dl>
c) <list>
d) <ol>
33
21) What is the correct HTML for making a checkbox?
a) <check>
b) <checkbox>
c) <input type="check">
d) <input type="checkbox">
22) What is the correct HTML for making a text input field?
a) <input type="text">
b) <input type="textfield">
c) <textfield>
d) <textinput type="text">
27) A request and response for a file are made by a) a browser and an
application
b) a client and an agent
c) the Web page
d) a client and a server
28) PHP originally stood for “personal home page” but now stands for
34
a) parsed HTML protocol
b) partial hypertext preprocessor
c) PHP: hypertext preprocessor
d) poly-hypertext programming
29) A language very often used for client-side web scripting is:
a) PHP
b) MySQL
c) JavaScript
d) C++
31) Which of the following code declaration blocks is most typical for
containing PHP code:
a) <?php … ?>
b) <?script … ?>
c) <? … ?>
d) <% … %>
35
36
37
38
39
40
41
42
43
44
Write the XHTML document that produces the form below.
45