Web App Development 2 - Section B (HTML, CSS, JS, etc)
1. CSS stands for:
Cascading Style Sheet
Cascading Styling Sheet
Counterstrike Source Sheet
Cascade Style Sheet
2. Which CSS selector applies to all h2 tags within a class called "yellow":
yellow h2
h2 #yellow
$yellow h2
.yellow h2
3. Which CSS selector applies to all div tags within the ID called "red":
red div
$red div
div #red
red blue
4. This question uses the following code: p {background-color: yellow; border: 1px solid black; } p #blue { background-color: blue; } Given the HTML code shown below how would the element be rendered: <p><p id="blue">Hello World</p></p>
Hello world, with no border and blue background
Hello world, with a solid border and a yellow background
Hello world with a solid border and blue background
Hello world with no border and no background color
5. This question uses the following code: p { background-color: yellow; border: 1px solid black; } p #blue { background-color: blue; } Given the HTML code shown below how would the element be rendered: <p><p class="blue" style="background-color: green">Goodbye World</p></p>
Goodbye world with no border and no background color
Goodbye world, with border and yellow background
Goodbye world, with no border and green background
Goodbye world with border and green background
6. Which line of JQuery code selects the element with a class red and assigns an event to when the element is clicked:
$(".red").click()
$("#red").click()
$("#red").onclick()
$(".red").onclick()
7. Which line of code selects a paragraph element with the class "blue", and assigns a hover event to it, such that on hover the text turns "green", and off hover it turns "red".
$("p#blue").hover( function() { $(this).css('color', ‘green’); }, function() { $(this).css('color', ‘red'); });
$("p#blue").onhover( function() { $(this).css('color', 'green’); }, function() { $(this).css('color', 'red'); });
$("p.blue").hover( function() { $(this).css('color', 'green’); }, function() { $(this).css('color', ‘red’); };
$("p.blue").onhover( function() { $(this).css('color', ‘green’); }, function() { $(this).css('color', ‘red'); });
8. The structure of Uniform Resource Locator structure is as follows:
scheme://domain/path&query_string=val#fragment_identifier
scheme://domain/path?query_string=val #fragment_identifier
protocol://domain/path&query_string=val #fragment_identifier
protocol://domain/path?query_string=val #fragment_identifier
9. REST and SOAP provide different ways for exchanging structured information. However, they both have advantages and disadvantages. Select the statement that best applies.
SOAP and REST both build upon HTTP, but REST puts the burden on the developer to process the message
SOAP and REST are complicated, very verbose, slow and add lots of overheads
SOAP is reliable but very verbose, whereas REST is simple but adds lots of overheads.
SOAP and REST are protocol specific, but SOAP is slow and very verbose
10. What is the role of XML on the web? Select the statement that best describes the role of XML on the web.
to be mechanism for storing annotated data, to be a mechanism for sharing annotated data, and to be a mechanism for securing annotated data
to be mechanism for storing annotated data, to be a mechanism for sharing annotated data, and to display data
to describe semi-structured documents, to be mechanism for storing annotated data, to be a mechanism for transporting annotated data
to describe semi-structured documents, to be a mechanism for storing annotated data, and to display data
11. CSS stands for:
Cascading Style Sheet
Cascade Style Sheet
Cascading Styling Sheet
Counterstrike Source Sheet
12. Which selector applies to all tags with a class called blue and are paragraph elements:
.blue p
$blue p
blue p
#blue p
13. Which selector applies to all tags with the ID called blue and are div elements:
$blue div
div #blue
blue div
div blue
14. The following code applies to the following question: p { background-color: yellow; border: 1px solid black; } p .blue { background-color: blue; } Given the HTML code shown below how would the element be rendered: <p id=“blueâ€>Hello World
Hello world with no border and no background color
Hello world, with a solid border and a yellow background
Hello world, with no border and blue background
Hello world with a solid border and blue background
15. The following code applies to the following question: p { background-color: yellow; border: 1px solid black; } p .blue { background-color: blue; } Given the HTML code shown below how would the element be rendered: <p style=“background-color: greenâ€>Goodbye World
Goodbye world with border and green background
Goodbye world, with no border and green background
Goodbye world, with border and yellow background
Goodbye world with no border and no background color
16. By referencing the Javascript as follows in the HTML is an example of:<head><link type="text/javascript" href="broken.js"></head>
inline referencing
external referencing
online referencing
embedded referencing
17. Assume that user has visited the site on previous occasions, and within the HTML on the site a piece of Javascript is referenced as follows: <head> <link type="text/javascript" href="notbroken.js"> </head> Select the option, where all apply:
page load times will be slower, content is separated from style, easy to maintain
page load times will be faster, content is separated from style, difficult to maintain
page load times will be faster, content is separated from style, easy to maintain
page load times will be slower, content is separated from style, difficult to maintain
18. Which line of JQuery code selects the element with a class brown and assigns an event to when the element is clicked:
$(“.brownâ€).click( )
$(“#brownâ€).onclick( )
$(“.brownâ€).onclick( )
$(“#brownâ€).click( )
19. Which line of code selects a paragraph element, and assigns a hover event to it, such that on hover the text turns blue, and off hover it turns red.
$("pâ€).onhover( function() { $(this).css('color', ‘blue’); },</br> function() { $(this).css('color', ‘red'); });
$("p").hover( function() { $(this).css('color', 'red’); },</br> function() { $(this).css('color', 'blue'); };
$("p").hover( function() { $(this).css('color', ‘blue’); },</br> function() { $(this).css('color', ‘red'); });
$("pâ€).onhover( function() { $(this).css('color', 'red’); },</br> function() { $(this).css('color', 'blue'); });
20. When writing JQuery code, it should be encapsulated by:
$(document).ready(function() {</br> // JQuery code to be added in here.</br> });
$().ready(function() {</br> // JQuery code to be added in here.</br> });
$(document).onready(function() {</br> // JQuery code to be added in here.</br> });
$().onready(function() {</br> // JQuery code to be added in here.</br> });
Submit Quiz