HTML and CSS Reference
Answer the following questions to test your knowledge of the information in this objective.
You can find the answers to these questions and explanations of why each answer choice is
correct or incorrect in the “Answers” section at the end of this chapter.
myDog from the following HTML? Choose all that apply.
<div id="main" class="mainStyle">
This is a web page about dogs. Here is my dog picture:
<img src="dog.jpg" id="myDog" class="thumb"/>
Here is a picture of my friend's dog:
<img src="dog.jpg" id="myfriendsDog" class="thumb"/>
C. document.getElementbyId(“dogs).querySelector (“thumb”);
To hide an element in the DOM and still be able to add it back later, what should you
Nothing, because the DOM is always available in a static form.
Keep a reference to the removed node to be able to add it back.
Call the document.restoreNodes method.
You can't add an element back after it's removed.