WorksheetsFinal Exam - WEB DEV
Total questions: 85
Worksheet time: 44mins
What does HTML stand for?
(a)
What is the syntax for an HTML comment?
<comment>This is a comment</comment>
<com: This is a comment>
<!-- This is a comment -->
<comment:"This is a comment" />
What is the difference between a start tag and an end tag?
An end tag starts with a forward slash.
They are identical.
An end tag is capitalized.
An end tag is mandatory but a start tag is optional.
Which file extension is used with standard web pages?
.doc
.xhtml
.txt
.html
Which of the following is an opening HTML tag?
</html>
<<html>>
<html>
<html/>
Which one of the following is a closing HTML tag?
<html />
</html>
<</html>>
<html>
Which tag is used to add an image?
<image>
<img>
<<img>>
</image>
Which of the following is the correct way to add an attribute?
<src>
classes:ids
id="title"
<id>
What symbol should you use to target an id in css?
.
+
id
#
What symbol should you use to target a class name in css?
#
()
.
class
What is the correct syntax to change the background color with css?
background-color: purple;
background-color = "purple";
backgroundcolor=orange
change-background-color: purple
TRUE OR FALSE: HTML is used to style web pages.
True
False
TRUE OR FALSE: CSS is used to style web pages
True
False
What is missing from this HTML skeleton?
<!DOCTYPE html>
<html>
<body>
</body>
</html>
<head></head>
<div></div>
<img></img>
<head>
What tag do you use to make a numbered list?
<list>
<ol>
<li>
<ul>
How do you change the font color with CSS?
font-color: green;
color: green;
change-font-color: green;
fontcolor=green;
TRUE OR FALSE: All tags require a closing tag.
True
False
Where should you put the link tag to connect your CSS and HTML file?
Between the <head> </head> in HTML
Between the <body> </body> in HTML
None of the above.
Where should you put the link tag to connect your CSS and HTML file?
Between the <head> </head> in HTML
Between the <body> </body> in HTML
None of the above.
TRUE OR FALSE: HTML is used to add content to web pages.
True
False
Which of the following is the correct CSS link tag?
<link rel="styles" href="stylesheet.css">
<link href="stylesheet">
<link rel="stylesheet" src="styles.css">
<link rel="stylesheet" href="styles.css">
the main heading in a web document?
CSS stands for
Code Style Sheet
Coding Style Sheet
Cascading Sheet Style
Cascading Style Sheet
Which is the correct CSS syntax?
body {color: yellow;}
body:color=yellow;
{body:color= yellow;}
{body;color: yellow;}
Which one is the correct syntax for CSS?
property {selector : value}
value {property : selector}
selector {value : property}
selector { property : value}
Which of these is an advantage of CSS?
Good control over the presentation.
Saves time on maintaining the html document.
Makes the web site look less cluttered.
All of the above
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?
How do you display a border like this:
border-width:10px 1px 5px 20px;
border-width:5px 20px 10px 1px;
border-width:10px 5px 20px 1px;
border-width:10px 20px 5px 1px;
th
one cell in a row of headers
one data cell
one row of headers
one column of headers
tr
one column on the right
one cell in a table
one row of anything
one column of anything
td
one cell in a header
one column of a row
one row of a column
one data cell in a row
The closing table tag is
</close>
</caption>
</table>
<table>
Which of the following tags will create a horizontal line across the page?
<hr>
<line>
<p>
<grid>
How can you make a numbered list?
<dl>
<list>
<ol>
<ul>
What form elements are used in creating this drop-down list?
<select> and <option>
<label> and <input>
<textarea> and <input>
<select> and <input>
What HTML input type is used to create this password field?
<input type="text">
<input type="submit">
<input type="password">
<input type="radio">
What HTML input type is used to create this form selections?
<input type="text">
<input type="submit">
<input type="password">
<input type="radio">
__________ provides an easy way to collect required information from web page visitors.
Link
Form
Image
None of the above
sets the color of words in a paragraph
h1 {
color: pink;
}
img {
color: pink;
}
body {
color: pink;
}
p {
color: pink;
}
Select the rule set to make all the text in your web page blue and centered.
p {
color: blue;
}
body {
text-align: left;
color: blue;
}
p {
text-align: center;
color: blue;
}
body {
text-align: center;
color: blue;
}
Which selector will change the font of the text?
font-size
text-align
font-famiy
text-decoration
Which rule set would change the font size to 24?
font-size: 24
size: 24;
font-size: 24;
font size: 24;
What type of language is PHP
Client Side
Server Side
Browser Side
Web Side
PHP is executed on
The Server
The Browser
The Website
The Machine
We store small snippets of information inside what?
Functions
Loops
If Statements
Variables
We create re-usable code blocks by placing them inside?
Variables
Parameters
Code Blocks
Functions
Sometimes we only want certain code to execute if a condition is true. How do we test for that?
Loop
If Statement
Integer
Variable
What is a integer?
It's a Whole Number
It's a Decimal Number
It's a True or False Declaration
It's a String of Text
What is a String?
Text
Number
True
Loop
What is a Boolean
It's Just Text
It's a Number
It's Just True
It's True or False
What if we want a block of code to execute several times?
Use a Variable
Use a Function
Use a Loop
Use a Leap
$colours = array("black, blue, Red, Green") - How do I access "Red" ?
$colours[0];
$colours[2];
$colours[1]
$colours[3];
How do I print out the values of the variable "name" ?
$name;
include $name;
echo $name;
echo $name
function sayMyName(name) {} ; - How do I call tat function
sayMyname();
$sayMyName;
$sayMyName();
sayMyName("John")';
What does i++ do ?
Adds the text on to the end of i
Adds i on to the end of something
Adds i on to the existing value of i
Adds 1 to the current value of iThis is a correct answer
What type of variable is this: $isMale = false;
Integer
Boolean
String
char
In an IF statement we can have 2 conditions tested. Which keyword allows this?
Else
if Else
Else if
OR
$a = 4 ; $b = 6; $c = $a + $b; What is the value of variable "c" ?
6
8
10
None
$a = "Ram"; $n = "Kumar"; $fullName = $f + $n; What is the value of $fulName
RamKumar
Ram Kumar
Ram
None
$a = "Ram"; $n = "Kumar"; $fullName = $f . $n; What is the value of $fulName
RamKumar
Ram Kumar
Kumar
None
function declarations can have (a) assigned to them?
Function calls can have____________ inside them.
Parameters
Arguments
Variables
Types
PHP is a____________side scripting language
server
browser
client
PHP stands for
Hypertext processor
Homepage processor
Hypertext preprocessor
Who is known as father of PHP
Rasmus Lerdorf
Brendan Eich
Hakon Wium Lie
Which of the following is not true?
PHP can be used to develop web applications.
PHP makes a website dynamic
PHP can not be embedded into html.
PHP scripts are enclosed within ___
<php> . . . </php>
<?php . . . ?>
?php . . . ?php
Variables used in php
$a=5;
var a=5;
int a=5;
_______ is a concatenation operator in php
+ (plus)
+=
. (dot)
PHP is a case sensitive
TRUE
FALSE
Find the output
<?php
$x = 5;
{ $x = 10;
echo $x;
}
echo $x;
?>
105
510
1010
find the output
<?php
$x = 1;
$x += 1;
echo $x;
?>
2
1
0
