Font size
WorksheetsJS/DOM/JQuery/HTML/CSS
Total questions: 18
Worksheet time: 14mins
jQuery is a programming language
True
False
Which method selects the first matching element in the document?
document.querySelectorAll()
document.getElementsByClass()
document.querySelector()
document.getElementsByTagName()
Which symbol does jQuery use as a shortcut for jQuery?
%
&
.
$
What are the preferred (modern) coding conventions for declaring variables?
const
var
let
mkdir
What is the correct syntax for string interpolation?
`${}`
'%{}'
${}
`%{}`
How do you add elements into an array?
.add()
.push()
.shift()
.pop()
Why would you want to use jQuery over vanilla Javascript?
Because I don’t want to write double the code
For easier DOM manipulation
Because I like seeing $$$ signs everywhere on my screen
Because I prefer chocolate JavaScript
What is the correct jQuery code to set the background colour of all p elements to red?
$("p").css("backgroundColor","red");
$("p").layout("background-color","red");
$("p").manipulate("background-color","red");
$("p").css("background-color","red");
Which is correct CSS syntax?
{
body; color = black;
}
body: color = black
body {
color: black;
}
{
body colour is black
}
What tag do you use to create a numbered list?
<list>
<ol>
<li>
<ul>
What are the correct ways to access elements in vanilla JavaScript (DOM)?
document.getElementById()
document.querySelector()
document.grab()
document.select()
What language or library is the following code written in? #function{
margin-left:20px;
}
JavaScript
jQuery
German
CSS
What does CSS stand for?
Cascading Style Sheets
Creative Style Sheets
Computer Style Sheets
Colourful Style Sheets
Which of the following jQuery method is used to set the value of an element?
val() method
setValue() method
content() method
None of the above
Inside which HTML element do we put the Javascript?
js
javaScript
script
scripting
What is the meant by "this"?
that
depends who's asking
`this` in a higher pitch
the object of which the function is a property
What method do you use to hide an element in jQuery?
display(none) Method
hidden(element) Method
hide() Method
visible(false) Method
Which of the jQuery function prevents the code from running before the loading of the document finishes?
$(document).load()
$(document).unload()
$(document).ready()
$(document).trim()
