w3schools jQuery quiz GRADE A Q&A
1. Which of the following is correct?
jQuery is a JavaScript Library
jQuery is a JSON Library - (correct answer)jQuery is a JavaScript Library
2. jQuery uses CSS selectors to select elements?
True
False - (correct answer)True
3. Which sign does jQuery use as a shortcut for jQuery?
the % sign
the ? Sign
the $ sign - (correct answer)the $ sign
4. Look at the following selector: $("div"). What does it select?
All div elements
The first div element - (correct answer)All div elements
5. Is jQuery a library for client scripting or server scripting?
Client scripting
Server scripting - (correct answer)Client scripting
, 6. Is it possible to use jQuery together with AJAX?
No
Yes - (correct answer)Yes
7. The jQuery html() method works for both HTML and XML documents
True
False - (correct answer)False
8. What is the correct jQuery code to set the background color of all p elements to red?
$("p").style("background-color","red");
$("p").layout("background-color","red");
$("p").manipulate("background-color","red");
$("p").css("background-color","red"); - (correct answer)$("p").css("background-
color","red");
9. With jQuery, look at the following selector: $("div.intro"). What does it select?
All div elements with class="intro"
The first div element with id="intro"
All div elements with id="intro"
The first div element with class="intro" - (correct answer)All div elements with
class="intro"
10. Which jQuery method is used to hide selected elements?
1. Which of the following is correct?
jQuery is a JavaScript Library
jQuery is a JSON Library - (correct answer)jQuery is a JavaScript Library
2. jQuery uses CSS selectors to select elements?
True
False - (correct answer)True
3. Which sign does jQuery use as a shortcut for jQuery?
the % sign
the ? Sign
the $ sign - (correct answer)the $ sign
4. Look at the following selector: $("div"). What does it select?
All div elements
The first div element - (correct answer)All div elements
5. Is jQuery a library for client scripting or server scripting?
Client scripting
Server scripting - (correct answer)Client scripting
, 6. Is it possible to use jQuery together with AJAX?
No
Yes - (correct answer)Yes
7. The jQuery html() method works for both HTML and XML documents
True
False - (correct answer)False
8. What is the correct jQuery code to set the background color of all p elements to red?
$("p").style("background-color","red");
$("p").layout("background-color","red");
$("p").manipulate("background-color","red");
$("p").css("background-color","red"); - (correct answer)$("p").css("background-
color","red");
9. With jQuery, look at the following selector: $("div.intro"). What does it select?
All div elements with class="intro"
The first div element with id="intro"
All div elements with id="intro"
The first div element with class="intro" - (correct answer)All div elements with
class="intro"
10. Which jQuery method is used to hide selected elements?