JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Gallery
Share
Explore
Test questions on HTML DOM and BOM, JavaScript APIs and jQuery formulations:
The Document Object Model (DOM) ... does what ?
The Browser Object Model (BOM) includes objects like document, location, history, and navigator. TF
Using JavaScript, you can change the content of HTML elements, attributes, and CSS styles. TF
Describe how CSS works.
Multiple Choice Questions
What does the
window
object represent in the Browser Object Model (BOM)?
a. The user's screen
b. The current HTML document
c. The browser's window
d. The JavaScript console
Which method is used to manipulate the HTML DOM and add a new element?
a.
document.addElement()
b.
document.createElement()
c.
document.addNewElement()
d.
document.newElement()
In the DOM, which property is used to set or return the content of an element?
a.
innerHTML
b.
outerHTML
c.
textContent
d. Both a and c
Match-up the Concepts
Which HTML tag is used to insert JavaScript code into an HTML document?
a.
<java>
b.
<javascript>
c.
<js>
d.
<script>
Which HTML tag is used to insert CSS code into an HTML document?
a.
<java>
b.
<javascript>
c.
<js>
d.
<script>
Concepts:
a.
innerHTML
b. Event Listener
c.
<form>
tag
d.
console.log()
Descriptions:
cssCopy code
i. An HTML tag used to create an input form for user data
ii. A method in JavaScript used for debugging purposes
iii. A property in JavaScript used to get or set the HTML
content
of an element
iv. A function in JavaScript that waits for an event to occur
Concepts:
a.
$(this)
selector
b.
window.history
object
c.
document.querySelector()
d.
.addClass()
Descriptions:
cssCopy code
i. A jQuery method used to add a class to a selected element
ii. In jQuery, a keyword referring to the element that triggered the event
iii. The method used in JavaScript to select the first element that matches a specified CSS selector(s)
iv. The object in BOM allowing manipulation and navigation of the browser history
Match the following concepts with their descriptions:
Concepts:
a.
window
object
b. jQuery
c. DOM
d.
document.createElement()
Descriptions:
i. A JavaScript library designed to simplify HTML DOM tree traversal and manipulation.
ii. The method used to create a new HTML element in JavaScript.
iii. A hierarchical representation of the
content
of a webpage.
iv. The global object in a browser context, representing the window in which the script is running.
Short Answer Questions
How does the Browser Object Model (BOM) differ from the Document Object Model (DOM)?
Describe how JavaScript can be used to manipulate the Browser Object Model.
What is the purpose of the
getElementById()
method in the DOM, and how is it used in JavaScript?
What is jQuery?
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.