Font size
WorksheetsJavaScript (Jquery) Quiz#1
Total questions: 30
Worksheet time: 16mins
Indicates the beginning and the end of a JavaScript section.
<html> </html>
<style> </style>
<article> </article>
<script> </script>
What is one key characteristic of an id?
It must be capitalized
It must be unique to one tag
It cannot include numbers
It must go in the closing tag
Which of the following is the proper way to call the testFunction() function when a button is clicked?
onclick=testFunction
when button clicked = "testFunction()"
onclick="testFunction()"
onclick="testFunction"
DOM get element by id is?
Document.Getelementbyid()
document.getElementById()
Document.getElementByID()
DOM.getElmentById()
What do "purple", "green" in this code refer to?
var x1= document.getElementById("purple")
var x2= document.getElementById("green")
They are the IDs
They are the names of the HTML
They are the names of <h1> tags
They are the names of <p> tags
What does the acronym DOM stand for?
Document Object Model
Document Output Method
Data Object Management
Direct Object Manipulation
Which property is used to change the CSS style of a DOM element in JavaScript?
class
style
textContent
innerHTML
Which method retrieves the corresponding value of an attribute?
getAttribute
setAttribute
removeAttribute
innerHTML
Which method allows you to delete entire HTML attributes from an element?
getElementById
setAttribute
innerHTML
removeAttribute
Which of the following tags are used in creating a list
<lu> </lu>
<ol> </ol>
<ul> </ul>
<li> </li>
Which of the following are HTML tags that can be put inside the Head Section
<title></title>
<script></script>
<style></style>
<body></body>
Which of the following are types of Arithmetic Operators
x
+
%
*
With jQuery, you can hide and show HTML elements with the hide() and show() methods?
True
False
Which of the following is the correct CSS link tag?
<link rel="styles" href="stylesheet.css">
<link href="stylesheet">
<link rel="stylesheet" src="styles.css"/>
<link rel="stylesheet" href="styles.css">
What will be the output of the following code snippet?
<script type="text/javascript">
var a = 5;
var output = 5 + "9";
document.write(output);
</script>error
14
59
non of these
<H1 STYLE=”font-size: 48pt; font-family: Arial; color: green”> CSS Test Text
</H1>
What type of css is used by the above code.
Inline
Embedded
External
Non of the above
Which web development tools would I use if I wanted my web page to have specific colors and style?
HTML
CSS
Javascript
PHP
Which of the below options is correct to change the background color to blue in CSS?
body {
background-colour: lightblue;
}
body {
background-color: lightblue;
}
body {
background:color: lightblue;
}
None of the above
The "#" is used to select an html element by its:
class
id
name
data attribute
Which of the following is selected by $('#bar')?
<div class='bar'></div>
<p data-bar='bar'></p>
<h1>bar</h1>
<img id='bar'></img>
jQuery selectors allow you to ______?
Style HTML element(s).
Manipulate HTML element(s).
Select HTML element(s).
Select, Manipulate and Style HTML element(s).
Which method is used to get or set the value of an input element?
.val()
.value()
.input()
.getValue()
What is the purpose of the .ready() method?
To run code when the DOM is fully loaded
To hide elements
To show elements
To check if an element is visible
Which sign does jQuery use as a shortcut for jQuery?
$
&
=
Which is the correct syntax for a link?
<a href="url">link text</a>
<a href="url" link text>
<a href=url>link text</a>
<a href="url" link text</a>
Which of the following is the correct HTML syntax for inserting an image
<img>apple.jpg</img>
<img src="apple.jpg">
<image src="apple.jpg">
<img ="apple.jpg">
