Question 1
Question
Are the Internet and WWW the same thing?
Question 2
Question
Which server is used to help determine the IP address of yorku.ca?
Question 3
Question
Which of the following is correct HTML5 for displaying an image?
Answer
-
<img src="image.gif">
-
<img src="image.gif" alt="an image">
-
<image alt="image.gif">
-
<image src="image.gif" alt="an image">
-
<img file="image gif" alt="an image">
Question 4
Question
Which is not a valid IP address format?
Answer
-
56.0.267.34
-
200.43.33.34
-
128.0.44.1
-
1.21.44.129
Question 5
Question
How could you output the following text in HTML?: <p> This is an example of a paragraph tag </p> in HTML
Answer
-
<p> \<p\> his is an example of a paragraph tag \</p\>" in HTML </p>
-
<p> <<p>> his is an example of a paragraph tag <<\p>> in HTML </p>
-
<p> <p> This is an example of an paragraph tag </p> in HTML </p>
-
<p> "<p> This is an example of a paragraph tag </p> in HTML" </p>
Question 6
Question
Which protocol provides multiplex?
Question 7
Question
In HTML, paragraphs start with ... and end with ....
Answer
-
start with <br> and end with </br>
-
start with <p> and end with </p>
-
start with <p> and end with <li>
-
start with <center> and end with </p>
-
start with <p> and end with <ol>
Question 8
Question
Which of the following is true about block and inline elements in HTML?
Answer
-
Block elements represent blocks of text. All other entries are in-line elements.
-
Block elements, nested elements, and inline elements must all be contained within meta elements.
-
Block elements generally represent a relatively large portion of a page and may contain other
tags within it. Inline elements generally represent smaller portions of a page and are contained within a block element.
-
. Block elements generally represent a relatively large poriton of a page, but cannot contain
other elements wihtin them. Inline elements generally represent smaller portions of a page and
are contained within nesting elements.
-
Block elements are the building blocks of html documents and must be contained within inline
elements.
Question 9
Question
The syntax template for a basic html page will ...
Answer
-
Surround the page with <head> ... </head> tags.
-
Use <head> ... </head> tags to identify the author of the page.
-
Surround the page with <html> ... </html> tags.
-
Properly indent material within the page so that it is readable.
-
Begin with <html> and end with </body>
Question 10
Question
meta tags in the header section of a web page
Answer
-
support global name search and replace.
-
enable the server to transmit your page more efficiently
-
enable the browser to render your page more efficiently.
-
supports caching that otherwise would not be possible.
-
provide valuable information to search engines and browsers about the structure and content of your document.
Question 11
Question
Which group is in charge of deciding top-level domain names?
Question 12
Question
What is the correct HTML element for inserting a line break?
Answer
-
<break>
-
<paragraph>
-
<p>
-
<h1>
-
<br>
Question 13
Question
Which tag is not associated with tables in HTML?
Answer
-
<row>
-
<tr>
-
<table>
-
<th>
-
<td>
Question 14
Question
In HTML comments start with ... and end with ...
Answer
-
they start with /* and end with */
-
they start with /** and end with **/
-
they start with <!-- and end with -->
-
they start with <comment> and end with </comment>
-
they start with // and end with a carriage return
Question 15
Question
Which of the following is not an HTML element?
Answer
-
DOCTYPE
-
body
-
html
-
table
-
img
Question 16
Question
It is important that your web pages follow web standards so that
Answer
-
they will render properly over a range of different browsers and devices.
-
they will be approved by Google.
-
they will be more efficient to compress and transfer across the web.
Question 17
Question
Which of the following HTML tags are classified as empty or void tags? Choose the most complete answer
Question 18
Question
Which HTML element will not ignore spaces in text content
Answer
-
<p>
-
<a>
-
<code>
-
<h1>
-
<pre>
Question 19
Question
In HTML the following heading tags are permitted
Answer
-
<heading>, <subheading>, <subsubheading>
-
<h1> through <h6>
-
<h1> through <h9>
-
<head>, <subhead>, <subsubhead>
-
<head>
Question 20
Question
If some text is preceded by <p><em> then it must be proceeded by:
Answer
-
</p></em>.
-
any of the above.
-
</em /p>
-
</p em>
-
</em></p>.
Question 21
Question
Which of the following tags starts a bulleted list?
Answer
-
<list>
-
<ul>
-
<list type="bulleted">
-
<ol>
-
<bulleted>
Question 22
Question
Every HTML element has a parent element except:
Answer
-
<meta>
-
<br />
-
<body>
-
<head>
-
<html>
Question 23
Question
Which of the following tags creates a definition list?
Question 24
Question
The 'C' in W3C stands for:
Answer
-
Consortium
-
Central
-
Corporation
-
Committee
-
Control
Question 25
Question
Which is not a valid URL format?
Answer
-
a. http://130.63.236.137/index.html
-
b. http://yorku.ca:80
-
1Wh8RzcQZr4
-
d. http://www.youtube.com/watch?v
-
e. http://yorku.ca/
-
f. http://www.textpad.com/download/index.html
Question 26
Question
Which of the following will cause you to open the link in a new tab or browser window?
Answer
-
a. <a href="http:www.cse.yorku.ca" target="_top">
-
b. <a href="http:www.cse.yorku.ca" target="/">
-
c. <a href="http:www.cse.yorku.ca" target="new">
-
d. <a href="http:www.cse.yorku.ca" target="_blank">
-
e. <a href="http:www.cse.yorku.ca" target="_new">
Question 27
Question
Which of the following characters is used to indicate the end of a tag?
Question 28
Question
HTML is intended to ...
Answer
-
provide structure and content to a document but not specify its appearance
-
provide neither appearance nor structure to a document.
-
provide an efficient represntation to download material from the web.
-
provide the appearance of a document but not specify its structure.
-
provide both appearance and structure to a document.
Question 29
Question
Which of the following HTML elements defines the title of a document?
Answer
-
<title text="This is a title">
-
<title>This is a title</title>
-
<meta>This is a title</meta>
-
<html>This is a title</html>
-
<head>This is a title</head>
Question 30
Question
Which of the following correctly creates a hyperlink?
Answer
-
a. <a "http:www.yorku.ca">EECS</a>
-
<a name="http:www.yorku.ca">EECS</a>
-
<a link="http:www.yorku.ca">EECS</a>
-
<a url="http:www.yorku.ca">EECS</a>
-
<a href="http:www.yorku.ca">EECS</a>
Question 31
Question
Tags that are not directly displayed on the page are written
in the _____ section.
Answer
-
<html>
-
<body>
-
<head>
-
<title>
Question 32
Question
The WWW is attributed to which person?
Answer
-
a. Tim Cerf
-
b. Bill Gates
-
c. Tim Berners-Lee
-
d. Vincent Cerf
Question 33
Question
Which of the following tags starts a numbered list?
Answer
-
a. <list>
-
b. <numbered>
-
c. <ol>
-
d. <ul>
Question 34
Question
The syntax of HTML requires that the name and value of an element's attribute be separated by:
Answer
-
a. a semicolon.
-
b. one or more spaces.
-
c. a comma
-
d. a tab.
-
e. an equal sign
Question 35
Question
How would you insert a copyright symbol into a web page?
Question 36
Question
Text that is be emphasized should be surrounded with
Question 37
Question
The tag <!-- DOCTYPE html --> is interpreted by your browser as ....
Answer
-
a. this page is written using HTML syntax.
-
b. this is a comment, the browser ignores it.
-
c. this page has an associated CSS.
-
d. this page was intentionally left blank.
-
e. this page is written using a word processor.
Question 38
Question
Which protocol provides multiplex?
Question 39
Question
In PHP, what is the output of the following code
$a = 2 + 3 * 5 + 10;
print $a;
Answer
-
a. 35
-
b. 27
-
c. 23510
-
d. 20
Question 40
Question
In CSS which property is used to control the background
color?
Answer
-
a. bgcolor
-
b. colour
-
c. color
-
d. color-background
-
e. background-color
Question 41
Question
In CSS, which property would be used to allow an image to be positioned on the right?
Answer
-
a. float: right
-
b. align: righ
-
c. overflow: hidden
-
d. clear: right
Question 42
Question
The difference between serif and sans-serif fonts is that
Answer
-
a. serif fonts have small lines at the end of some characters while
sans-serif do not
-
b. serif fonts are monospaced while sans-serif have variable width
-
c. sans-serif fonts are monospaced while serif have variable width
-
d. sans-serif fonts can be used without paying a royalty, while a royalty must be
paid for serif fonts
-
e. sans-serif fonts have small lines at the end of some characters while
serif do not
Question 43
Question
In PHP what is the data type of the variable $c?
$a = 10;
$b = 1.238;
$c = $a * $b;
Answer
-
a. boolean
-
b. float
-
c. array
-
d. integer
-
e. string
Question 44
Question
In CSS the selector p matches
Answer
-
a. all <p> elements whose class is p
-
b. all <p> elements whose id is p
-
c. all elements whose class is p
-
d. all <p> elements
-
e. all elements whose id is p
Question 45
Question
In CSS a rule has the syntax a { b : c ; }. In this
rule the symbol a is known as a
Answer
-
a. value
-
b. parameter
-
c. property
-
d. comment
-
e. selector
Question 46
Question
CSS enables links to be styled differently depending on
what state they are in. To set the hover colour for a link to be white, one would
code a CSS rule
Answer
-
a. a { hover-color : white ;}
-
b. a { color : white ; hover-dwell : true ;}
-
c. a { color : white ; hover : true ;}
-
d. a:hover { color : white ; }
-
e. a:link { color : white ; }
Question 47
Question
In PHP what is the data type of the variable $c?
$a = "10";
$b = "20";
$c = $a * $b;
Answer
-
a. float
-
b. string
-
c. integer
-
d. boolean
-
e. array
Question 48
Question
In CSS to apply color: red to
h1 and h2 you could use the rule(s)
Answer
-
a. h1.h2 { color : red; }
-
b. h1:h2 { color : red; }
-
c. h1 { red : color; } h2 { red : color; }
-
d. h1 { color : red; } h2 { color : blue; }
-
e. h1, h2 { color : red; }
Question 49
Question
Which of the following is a valid CSS selector ?
Answer
-
a. p.color { red; }
-
b. p { color red }
-
c. p color: red;
-
d. p { color: red; }
-
e. p color red
Question 50
Question
It is possible to define CSS in
Answer
-
a. only in internal style sheets
-
b. external style sheets, internal style sheets, and inline
-
c. only in external style sheets
-
d. only inline
-
e. only in external style sheets and internal style sheets
Question 51
Question
In PHP what is the value of $a
$s = "Hello World";
$a = $s[7]
Answer
-
a. "o"
-
b. "W"
-
c. 7
-
d. you will get an error
-
e. "Hello"
Question 52
Question
What does CSS stand for?
Answer
-
a. CSS does not stand for anything
-
b. Computer Symbol Sheets
-
c. Cascading Style Sheets
-
d. Computer Style Sheets
-
e. Cascading Symbols and Symptoms
Question 53
Question
In PHP, what would be the output of the following?
$a = 10;
$b = 5;
print '$a*$b';
Select one:
Answer
-
a. $a*$b
-
b. 50
-
c. you will get an error
-
d. 10*5
Question 54
Question
In CSS the selector #p matches
Answer
-
a. all <p> elements
-
b. all <p> elements whose id is p
-
c. all elements whose id is p
-
d. all elements whose class is p
-
e. all <p> elements whose class is p
Question 55
Question
In CSS the selector .par matches
Answer
-
a. all <p> elements whose id is par
-
b. all <p> elements whose class is par
-
c. all elements whose class is par
-
d. all elements whose id is par
-
e. all <p> elements
Question 56
Question
The following PHP code has an error. What line is this error on?
0: $a = 10 + 1;
1: $b = "10"
2: if ($a <> $b)
3: {
4: print "Not equal";
5: }
6: else
7: {
8: $b++;
9: }
Question 57
Question
In PHP, what is the output of the following code
$a = 2;
$a = $a + 2;
$a++;
print $a;
Question 58
Question
In CSS which property is used to control the
horizontal alignment of text in an element?
Answer
-
a. alignment
-
b. align
-
c. center
-
d. center-align
-
e. text-align
Question 59
Question
In PHP, what would be the output of the following?
$a = "hello world";
print $a[0];
Answer
-
a. l
-
b. you will get an error
-
c. h
-
d. hello
Question 60
Question
In PHP, what is the output of the following code?
$a = array("Abdel", "Didi", "Justin", "Trump");
if (in_array("Ford", $a))
{
print "found";
}
else
{
print "not found";
}
Question 61
Question
Which line of the following PHP code has an error?
0: $c = rand(1,10);
1: if ( c == 5 )
2: {
3: print " $color ";
4: }
Question 62
Question
In PHP, what is the value of the variable $c?
$a = array("red", "green", "yellow");
$b = "hello";
$c = $b . " " . strtoupper($a[1]);
Question 63
Question
What variable in PHP is used to access data passed via the URL?
Answer
-
a. $GET
-
b. $_POST
-
c. $POST
-
d. $_DATA
-
e. $_GET
Question 64
Question
In PHP, what would be the output of the following?
$nickname = array("Robert" => "Bob", "Michael" => "Mike",
"Abdelraham" => "Abdo", "Yaoling" => "Yaoyoa");
print $nickname["Robert"];
Select one:
Answer
-
a. Abdo
-
b. Yaoyao
-
c. Bob
-
d. Mike
Question 65
Question
In PHP, what is the output of the following code?
$a = "a|b|c|d|e|f|g";
$c = explode("|", $a);
print $c[1];
Answer
-
a. |
-
b. b
-
c. d
-
e. a|b|c|d|e|f|g
Question 66
Question
In PHP file I/O what does the function file_get_contents() do?
Select one:
Answer
-
a. returns a single string with the entire contents of the file
-
b. writes data to a file
-
c. checks to see if a file exists
-
d. returns an array of strings where each string is a line in the file
Question 67
Question
What variable in PHP is used to access data passed via the post method in HTML forms?
Answer
-
$_POST
-
. $_DATA
-
$POST
-
d. $GET
-
e. $_GET
Question 68
Question
What are the results of the following boolean expressions?
1) 5 < 4
2) 10 > 5
3) 5 == 20
Select one:
Answer
-
a. 1) false, 2) true, 3) false
-
b. 1) true , 2) true, 3) true
-
c. 1) true, 2) false, 3) false
-
d. 1) false, 2) false, 3) false
Question 69
Question
What is the output of the following PHP code?
$a = "string";
$a = strtoupper($a);
print $a[4];
Answer
-
a. I
-
b. N
-
c. i
-
d. n
-
e. STRING
Question 70
Question
Which file I/O function writes a data to a file in PHP?
Answer
-
a. file_put_contents()
-
b. file()
-
c. file_write_contents()
-
d. file_get_contents()
-
e. printfile()
Question 71
Question
In PHP, what would be the value of the variable $c?
$a = array("red", "green", "blue", "yellow");
$c = count($a);
Select one:
Question 72
Question
In PHP file I/O, file() does what?
Select one:
Answer
-
a. returns an array of strings where each string is a line in the file
-
b. returns a single string with the entire contents of the file
-
c. writes data to a file
-
d. checks to see if a file exists