Este Quiz é cronometrado.
Você tem 2 horas 30 minutos para completar as 151 questões deste quiz..
if you wanted a CSS rule to have all paragraphs of class silly to be centered on the page, which CSS rule would you use?
silly { text-align: center; }
p.silly { align: center; }
p
p.silly { text-align: center; }
p < silly { align: center; }
In CSS the selector .par matches
all elements whose class is par
all elements whose id is par
all <p> elements whose id is par
all <p> elements whose class is par
all<p>elements
In PHP, what is the output of the following code $a = 2; $a = $a + 2; $a++; print $a;
8
2
5
6
4
In CSS which property is used to control the size of the text?
font
text-style
font-style
text-size
font-size
In CSS a rule has the syntax a { b : c ; }. In this rule the symbol a is known as a
value
parameter
Selector
property
comment
$a = 10; $b = 5; print '$a*$b';
10*5
50
you will get an error
$a*$b
Which of the following is a valid CSS selector ?
p { color red }
p color red
p { color: red; }
p color: red;
p.color { red; }
In PHP, what would be the output of the following code: $a = 10; $b = 10; print "$a * $b";
100
$a * $b
10*10
Where should the reference to a style sheet be placed in an HTML document ?
In the <head> section.
In the <style> section.
In the 'tail> section.
In the <body> section.
In the <css> section.
What is the order of priority (from highest to lowest) that styles are applied to an element?
inline style, embedded style, externally linked style, default html style style sheet, the browser default
default html style, embedded style, inline style, externally linked style Incorrect
embedded style, inline style, externally linked style, default html style
externally linked style, embedded style, inline style, default html style
externally linked style, default html style, embedded style, inline style
In CSS, considering the CSS Box Model, would be the final width of an element with the following id? #item { width: 100px; border: 5px; margin: 5px; padding: 0px; }
110
105
120
90
In CSS the selector p matches
all <p> elements whose class is p
all elements whose id is p
all <p> elements whose id is p
all elements whose class is p
all <p> elements
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: }
0
1
Considering the CSS box model, what is the final width of an element of this class: .item { width: 100px; margin: 10px; padding-left: 10px; padding-right: 0px; }
130
150
Which of the following would change the background colour for all <h1> elements to white?
h1.all { background-color: white }
header1 { background-color: white }
.h1 { background-color: white }
h1 { background-color: white }
In CSS which property is used to control the background color?
color
backgroung-color
background-colour
bgcolor
In CSS to apply color: red to h1 and h2 you could use the rule(s)
h1.h2 { color : red; }
h1:h2 { color : red; }
h1, h2 { color : red; }
h1 { color : red; } h2 { color : blue; }
h1 { red : color; } h2 { red : color; }
In CSS which property is used to control the text color of an element?
text-color
background-color
foreground-color
text-colour
The difference between serif and sans-serif fonts is that
serif fonts have small lines at the end of some characters while sans-serif do not
sans-serif fonts have small lines at the end of some characters while serif do not
sans-serif fonts are monospaced while serif have variable width
serif fonts are monospaced while sans-serif have variable width
sans-serif fonts can be used without paying a royalty, while a royalty must be paid for serif fonts
Which of the following is not a valid variable in PHP?
$1name
$name
$_name1
$name1
$Name
In PHP what is the value of $a $s = "Hello World"; $a = $s[7];
"o"
"Hello"
"W"
7
In PHP, what will be the output of the following code $a = "hello "; $b = "world "; $c = 10; print $a . $c . $b ;
hello 10 world
10
hello world
hello
[HTML] In PHP, what is the output of the following code: $a = 10; $b = "10"; if ($a == $b) { print "hello "; } print "world";
world
$a
$b
In CSS the selector #p matches
The background of a given HTML element can be manipulated with
you cannot change the background of an element
only background-image
background-color, background-image
only background-color
In CSS which property is used to control the horizontal alignment of text in an element?
text-align
alignment
center-align
center
align
$a = 2 + 3 * 5 + 10; print $a;
27
23510
35
20
It is possible to define CSS in
only inline
only in external style sheets and internal style sheets
only in external style sheets
only in internal style sheets
external style sheets, internal style sheets, and inline
Which of the following is the correct HTML to refer to an external style sheet style.css ?
<style "style.css\">
<link rel="stylesheet" type="text/css" href="style.css">
<style> style.css</style>
<css rel="stylesheet" type="text/css" href="style.css">
<css> style.css</css>
What does CSS stand for?
Cascading Style Sheets
Computer Style Sheets
CSS does not stand for anything
Computer Symbol Sheets
Cascading Symbols and Symptoms
In PHP what is the data type of the variable $c? $a = "10"; $b = "20"; $c = $a * $b;
array
float
string
boolean
integer
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
a { color : white ; hover : true ;}
a:link { color : white ; }
a { color : white ; hover-dwell : true ;}
a { hover-color : white ;}
a:hover { color : white ; }
In CSS, which property would be used to allow an image to be positioned on the right?
clear: right
float: right
align: righ
overflow: hidden
In CSS, what is the range for the R, G, B when specifying a color using rgb(R, G, B) ?
1-256
0xFFFFFF
0-255
1-100
0-1
In PHP what is the data type of the variable $c? $a = 10; $b = 1.238; $c = $a * $b;
String
colour
color-background
Which of the following will cause you to open the link in a new tab or browser window?
<a href="http:www.cse.yorku.ca" target="_blank">
<a href="http:www.cse.yorku.ca" target="_top">
<a href="http:www.cse.yorku.ca" target="_new">
<a href="http:www.cse.yorku.ca" target="new">
<a href="http:www.cse.yorku.ca" target="/">
Which of the following HTML elements defines the title of a document?
<title text="This is a title">
<head>This is a title</head>
<title>This is a title</title>
<meta>This is a title</meta>
<html>This is a title</html>
How could you output the following text in HTML?: <p> This is an example of a paragraph tag </p> in HTML
<p> <<p>> his is an example of a paragraph tag <<\p>> in HTML </p>
<p> "<p> This 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>
Which of the following HTML tags are classified as empty or void tags? Choose the most complete answer
<hr>
No HTML tags are allowed to be empty or void. Incorrect
<hr>, <br> and <img>
<br> and <p>
<hr>, <br> and <p>
The syntax of HTML requires that the name and value of an element's attribute be separated by:
an equal sign.
a semicolon.
a tab.
one or more spaces.
a comma.
Every HTML element has a parent element except:
<meta>
<br/>
<head>
<html>
<body>
Which of the following correctly creates a hyperlink?
<a href="http:www.yorku.ca">EECS</a>
<a name="http:www.yorku.ca">EECS</a>
<a url="http:www.yorku.ca">EECS</a>
<a "http:www.yorku.ca">EECS</a>
<a link="http:www.yorku.ca">EECS</a>
The tag <!-- DOCTYPE html --> is interpreted by your browser as ....
this is a comment, the browser ignores it.
this page is written using a word processor.
this page is written using HTML syntax.
this page was intentionally left blank.
this page has an associated CSS.
How would you insert a copyright symbol into a web page?
<copyright>
<copyright />
<symbol tag="copyright" />
<sym tag="copyright" />
©
Which tag is not associated with tables in HTML?
<row>
<td>
<tr>
<table>
<th>
<caption>
Which of the following characters is used to indicate the end of a tag?
^
*
>
<
#
The 'C' in W3C stands for:
Consortium
Corporation
Committee
Control
Central
It is important that your web pages follow web standards so that
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.
meta tags in the header section of a web page
supports caching that otherwise would not be possible
enable the browser to render your page more efficiently.
enable the server to transmit your page more efficiently.
provide valuable information to search engines and browsers about the structure and content of your document.
support global name search and replace.
The WWW is attributed to which person?
Bill Gates
Tim Cerf
Vincent Cerf
Tim Berners-Lee
Which protocol provides multiplex?
Transmission Control Protocol
Hypertext Transport Protocol
Data Layer Protocol
Internet Protocol
Which of the following characters is used to indicate the start of a tag?
The syntax template for a basic html page will ...
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.
Surround the page with <head> ... </head> tags.
Begin with <html> and end with </body>
Which group is in charge of deciding top-level domain names?
W3C
ICANN
IETF
Google
Which is not a valid URL format?
http://yorku.ca
http://130.63.236.137/index.html
http://yorku.ca:80
http://www.textpad.com/download/index.html
1Wh8RzcQZr4
http://www.youtube.com/watch?v
HTML is intended to ...
provide an efficient representation to download material from the web.
provide neither appearance nor structure to a document.
provide both appearance and structure to a document.
provide the appearance of a document but not specify its structure.
provide structure and content to a document but not specify its appearance.
Text that is be emphasized should be surrounded with
<emphasize> and </emphasize>
<em> and </em>
<i> and </i>
<b> and </b>
<font size="large"> and </font>
Which of the following tags starts a numbered list?
<list type="numbered">
<list>
<ol>
<ul>
<numbered>
In HTML comments start with ... and end with ...
they start with <comment> and end with </comment>
they start with /** and end with **/
they start with <!-- and end with -->
they start with // and end with a carriage return
they start with /* and end with */
In HTML, paragraphs start with ... and end with ....
start with <center> and end with </p>
start with <p> and end with <li>
start with <br> and end with </br>
start with <p> and end with </p>
start with <p> and end with <ol>
In HTML the following heading tags are permitted
<h1> through <h6>
<h1> through <h9>
<heading>, <subheading>, <subsubheading>
<heading>, <subhead>, <subsubhead>
Which of the following is correct HTML5 for displaying an image?
<img file="image gif" alt="an image">
<img src="image.gif" alt="an image">
<img src="image.gif">
<image src="image.gif" alt="an image">
<image alt="image.gif">
Are the Internet and WWW the same thing?
No
Yes
If some text is preceded by <p><em> then it must be proceeded by:
</p em>
</p></em>
</em></p>
</em /p>
any of the above.
Which is not a valid IP address format?
200.43.33.34
128.0.44.1
56.0.267.34
1.21.44.129
Which of the following tags starts a bulleted list?
<bulleted>
<list type="bulleted">
Which of the following tags creates a definition list?
<dl>
<nl>
<li>
Which HTML element will not ignore spaces in text content
<h1>
<a>
<code>
'p"
<pre>
Tags that are not directly displayed on the page are written in the _____ section.
<title>
<p>
Which of the following is true about block and inline elements in HTML?
Block elements represent blocks of text. All other entries are in-line 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.
Block elements, nested elements, and inline elements must all be contained within meta elements.
What is the correct HTML element for inserting a line break?
<br>
<paragraph>
<break>
Which of the following is not an HTML element?
DOCTYPE
html
img
table
body
Which server is used to help determine the IP address of yorku.ca
Apache Web Server
Domain Name Server
Microsoft Internet Information Server (IIS)
Google Server
enable the server to transmit your page more efficiently
provide valuable information to search engines and browsers about the structure and content of your document
supports caching that otherwise would not be possible.
In PHP, what is the output of the following code? $a = "a|b|c|d|e|f|g"; $c = explode("|", $a); print $c[1];
b
a
|
d
a|b|c|d|e|f|g
In PHP file I/O what does the function file_get_contents() do?
returns a single string with the entire contents of the file
returns an array of strings where each string is a line in the file
writes data to a file
checks to see if a file exists
In HTML forms, input type="____" is a submit button?
submitbutton
submit
text
value="submit"
In PHP, what would be the output of the following? $nickname = array("Robert" => "Bob", "Michael" => "Mike", "Abdelraham" => "Abdo", "Yaoling" => "Yaoyoa"); print $nickname["Robert"];
Abdo
Mike
Yaoyao
Bob
In PHP file I/O, file() does what?
In HTML forms, what is the CSS selector for an input type="text"?
.input text
input .text
input[type="text"]
input["type=text"]
["type=text"]
In PHP, what would be the value of the variable $c? $a = array("red", "green", "blue", "yellow"); $c = count($a);
3
yellow
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"; }
found
no output
this will cause an error
not found
Which line of the following PHP code has an error? 0: $c = rand(1,10); 1: if ( c == 5 ) 2: { 3: print " $color "; 4: }
What variable in PHP is used to access data passed via the post method in HTML forms?
$_POST
$POST
$_DATA
$GET
$_GET
What are the results of the following boolean expressions? 1) 5 < 4 2) 10 > 5 3) 5 == 20
1) true , 2) true, 3) true
1) true, 2) false, 3) false
1) false, 2) false, 3) false
1) false, 2) true, 3) false
In HTML forms, input type="____" is a radio button?
radio button
radio
check
rad
radiobutton
Which file I/O function writes a data to a file in PHP?
file()
file_get_contents()
file_put_contents()
printfile()
file_write_contents()
In PHP, what is the value of the variable $c? $a = array("red", "green", "yellow"); $b = "hello"; $c = $b . " " . strtoupper($a[1]);
hello RED
HELLO GREEN
hello GREEN
hello RED GREEN YELLOW
HELLO RED
What variable in PHP is used to access data passed via the URL?
In HTML forms, the HTML element label does what?
specifics the URL for the data to be sent to
associates text with an UI input
creates a label icon
creates a text input
creates a box around some UI
Using HTML forms, the tag <form method="___"> transmits data from the form using the URL?
put
post
get
url
In HTML forms, which UI tag does not require a close tag?
<form>
<input>
<textarea>
<select>
In PHP, what would be the output of the following? $a = "hello world"; print $a[0];
l
h
What is the output of the following PHP code? $a = "string"; $a = strtoupper($a); print $a[4];
STRING
I
i
N
n
In PHP, $a[] = "hello" does what?
this will cause a syntax error in PHP
appends the string "hello" to the end of the array
sets all array elements to "hello"
puts the string "hello" at the beginning of the array
In JavaScript, which of the following is not a valid comparison operator?
===
!=
>=
=!=
==
!==
Consider the following JavaScript code snippet var q = 1 + 2 + parseInt("3"); After this executes, what value does q have?
33
123
"123"
In JavaScript, after executing var x = "hello"; then if you wanted to have var z have the value of the number of characters in x, you could use
var z = x.length();
var z = length(x);
var z = x.length;
var z = 3;
var z = x.len;
In JavaScript, after executing var x= "hello"; then if you wanted to have var z contain a string of the last character in x, you could use
var z = x.charAt(4);
var z = 'h';
var z = x.charAt(3);
var z = x.charAt(-1);
var z = "h";
Which variables below a global variable? var i=0; function foo() { var a = 10; var b = 20; var c = a*10 + b; }
c
In JavaScript single line comments start with
//
/
##
C
In JavaScript, after executing var x = 2; var z = 1; if (x == 4) { z = 6; } else { z = 3; } then z has the value
infinity
In JavaScript, after executing var x = 4; var z = 1; if (x > 0) { z = 2; } then z has the value
In JavaScript, how many times does the code for(var x=0;x<5;x++) alert("hi"); cause an alert box to appear on the screen?
What global event is called once the HTML page has loaded?
HTML.pageLoad
window.onload
document.pageLoaded
window.load
document.onload
In JavaScript, which of the following is interpreted as being false in a logical expression
NaN
3.1415
true
"hello world"
In JavaScript multiple line comments are surround with
// and //
/* and *
## and ##
// and */
/* and //
Consider the following HTML code: <div id="myDiv"> <p id="myP"> This is a test.</p> </div> How do you access the paragraph element above in JavaScript?
var a='<p id="myP">';
var a=document.getElementById("myP");
var a=document.getElementById("p);
var a=document.getElementById("myDiv);
In JavaScript, after executing var x = "2"; var y = "2"; var z = x + y; then the value of z is
22
"22"
this is invalid and will cause a run time error
In JavaScript, after executing var x = 10; var z = "" + x; then the value of z is
"1","0"
"10"
""
What does DOM stand for?
Direct Object Manipulation
Document Object Model
Document Object Module
Detailed Object Map
Which of the following is not a fundamental type in JavaScript?
Number
Module
Boolean
Array
What is the proper way to define an array in JS?
var a =["a", "b", "c", "d"];
var a =("a", "b", "c", "d");
var a ="a", "b", "c", "d";
var a =array("a", "b", "c", "d");
How would you create an alert box with "Hello" in JavaScript?
print("Hello")
alert("Hello")
log("Hello")
msgBox("Hello")
dialog("Hello")
The following code is considered? <button id="ok" onclick="okayClick();">OK</button>
obtrusive JavaScript
unobtrusive JavaScript
Consider the following JavaScript code. What type is the variable p? var p = document.getElementsByTagName("p");
an array of element objects
a DOM tree
a paragraph
an element object
What does the following JavaScript code do? var myP = document.getElementById("myP"); myP.children[1].style.backgroundColor = "silver";
Sets the background color to silver of the third child of element id="myP"
Modifies all children of elemetn id="myP"
Sets the background color to silver of the first child of element id="myP"
Sets the element id="myP" background to silver
Sets the second child of element id="myP" background to silver
Based on the following JS code which variable is local scoped? var a=10; function myFunc() { var c=document.getElementById("myPar"); }
document
both a and c
What does the following JavaScript code snippet do? $("button").stopObserving("mousemove");
removes the event handler function named "mousemove"
stops the mouse from moving over any buttons
removes the event handler function named "mousemove" for element with id="button"
removes the event handler function for "mousemove" events for element with id="button"
In the Prototype library, the $("p") function is equivalent to?
document.getElementsByTagName("p");
document.createElement("p");
document.getElementByTagName("p");
document.getElementById("p");
When does the global event "window.onload" get called?
As soon as the JS file is linked to the HTML page.
When a new window is created by an alert().
Only when the browser's refresh button is pressed.
After the webpage has been loaded.
Consider the following JavaScript code: 0: var allParas = document.getElementsByTagName("p"); 1: for (var i = 0; i < allParas.length; i++) { 2: ??? 3: } What code should be placed on line 2 to make the background color of all p elements silver?
allParas[i].style.backgroundColor = "silver";
allParas[i].backgroundColor = "silver";
allParas.style.backgroundColor = "silver";
allParas.backgroundColor = "silver";
Are the following two lines of code equivalent? $("button").observe("click", myClick); $("button").onclick = myClick;
In Javascript, if you wanted to set a timer that calls function "myFunc" every second, which statement would you use?
setTimeout(myFunc, 1000);
setInterval(myFunc, 1000);
setInterval(1000, myFunc);
setTimeout(myFunc, 1000, REPEAT);
setRepeat(myFunc, 1000);
Consider the following HTML form object: <input type="text" id="name"> How do you access content the user typed into this text field?
$("name").data
$("name").innerHTML
$("name").submit()
$("name").value
Assume function myClick is already defined. Which line in the following JavaScript code contains an error? 0: var allPars = document.getElementsByTagName("p"); 1: var myButton = document.getElementById("myButton"); 2: myButton.onclick = myClick; 3: allPars.onclick = myClick;
There is no error in this code.
Consider the following HTML code as a DOM tree: <div id="myDiv"> <h1> Hello </h1> <p> This is a test. </p> <p> This is only <a href=""> a test. </a> </p> <p> There will be one more test. </p> </div> Is the h1 element an ancestor of the element <a>?
Consider the following HTML: 0: <div> 1: <h1> A </h1> 2: <p> B </p> 3: <p> C </p> 4: </div> which statement would return the element at line 3?
$("p")
getElementById("p")
$("h1").children[0]
$("div").children[2]
Using the Prototype library, which of the following would be used to submit a form?
$("myForm").submitForm();
document.submit();
$("myForm").submit();
$("myForm").submit = true;
Consider the following HTML code as a DOM tree: <div id="myDiv> <h1> Hello </h1> <p> This is a test. </p> <p> This is only <a myid="a" href=""> a test. </a> </p> <p> There will be one more test. </p> </div> Is the element myid="a" a child of the div element?
no
yes
Consider the following HTML code as a DOM tree: <div id="myDiv> <h1> Hello </h1> <p> This is a test. </p> <p> This is only <a href=""> a test. </a> </p> <p> There will be one more test. </p> </div> How many descendant element nodes does the div have?
What does the variable "this" refer to in the following JavaScript function: function clickHandler() { this.innerHTML = "clicked"; }
it refers to an HTML button element.
it refers to document.getElementsByTag("this").
it refers to an HTML checkbox element.
it refers to the HTML element object that called this function.
In JavaScript, does the DOM tree include the head section of the HTML page?
Consider the following HTML and JS code. What is the value of pars.length? <body> <p> Paragraph 1 </p> <div id="myDiv"> <p> Paragraph 2 </p> </div> </body> var myDiv=document.getElementById("myDiv"); var pars=document.getElementsByTagName("p");
How would you create a new DOM node of type <p> in JavaScript?
$("p").create();
document.newParagraph(1);
document.createTextNode("<p>");
Consider the following JavaScript code. When will the function "myFunc" be called? window.onload = function() { setTimeout(myFunc, 1500); }
After 1.5 seconds after the window.onload event
After 3pm on the current day the webpage is being accessed.
After 1500 seconds after the window.onload event
After 15 seconds after the window.onload event
In JavaScript, which of the following provides the X coordinates with respect to the HTML element the mouse is over?
event.browserX
event.offsetX
event.clientX
event.screenX
When interpreted as a DOM tree, how child nodes does div id="myDiv" have has children? <p> Paragraph 1 </p> <div id="myDiv"> <ul> <li> Item 1 </li> <li> Item 2 </li> <li> Item 3 </li> </ul> </div> <p> Paragraph 2 </p>
Consider the following JS Prototype code. When will the function "myFunc" be called? $("myPar").observe("mouseover", myFunc); $("myPar").observe("keydown", myVar)
anytime an event occurs with element id="myPar"
when the mouse cursor enters element id="myPar"
anytime the mouse cursor moves within the element id="myPar"
when a key is pressed down over element id="myPar"
In JavaScript, what command can be used to remove a node from the DOM tree?
document.removeChild(...)
document.killChild(...)
document.unappendChild(...)
document.deleteChild(...)
Consider the following HTML code as a DOM tree. How many children does the <body> element have? <body> <h1> My webpage </h1> <div> <p> Testing. </p> <p> Another paragraph. </p> </div> </body>