Web App Development 2 - 2015 - Section B (HTML, CSS, JS, etc)
1. CSS stands for:
Cascade Style Sheet
Counterstrike Source Sheet
Cascading Styling Sheet
Cascading Style Sheet
2. Which selector applies to all tags with a class called blue and are paragraph elements:
blue p
$blue p
.blue p
#blue p
3. Which selector applies to all tags with the ID called blue and are div elements:
div blue
blue div
$blue div
div #blue
4. 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 blue background
Hello world with a solid border and blue background
Hello world, with a solid border and a yellow background
Hello world with no border and no background color
5. 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 border and yellow background
Goodbye world with no border and no background color
Goodbye world, with no border and green background
6. By referencing the Javascript as follows in the HTML is an example of:<head><link type="text/javascript" href="broken.js"></head>
external referencing
embedded referencing
online referencing
inline referencing
7. 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 faster, content is separated from style, easy to maintain
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 slower, content is separated from style, difficult to maintain
8. 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( )
9. 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', 'red’); },</br> function() { $(this).css('color', 'blue'); });
$("p").hover( 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â€).onhover( function() { $(this).css('color', ‘blue’); },</br> function() { $(this).css('color', ‘red'); });
10. When writing JQuery code, it should be encapsulated by:
$().onready(function() {</br> // JQuery code to be added in here.</br> });
$(document).onready(function() {</br> // JQuery code to be added in here.</br> });
$().ready(function() {</br> // JQuery code to be added in here.</br> });
$(document).ready(function() {</br> // JQuery code to be added in here.</br> });
Submit Quiz