Which lines of code should you use? (Each correct answer presents part of the solution

You are developing an HTML5 page that has an element with an ID of logo. The page includes the following HTML.
<code>
<div>
Logo:<br>
<div id=”logo”>
</div>
</div>
</code>
You need to move the logo element lower on the pageby five pixels.
Which lines of code should you use? (Each correct answer presents part of the solution. Choose two.)

You are developing an HTML5 page that has an element with an ID of logo. The page includes the following HTML.
<code>
<div>
Logo:<br>
<div id=”logo”>
</div>
</div>
</code>
You need to move the logo element lower on the pageby five pixels.
Which lines of code should you use? (Each correct answer presents part of the solution. Choose two.)

A.
document.getElementById(“logo”) .style.position =”relative”;

B.
document.getElementByld(“logo”).Style.top = “5px”;

C.
document.getElementById(“logo”).style.top = “-5px”;

D.
document.getElementById(“logo”).style.position = “absolute”;



Leave a Reply 4

Your email address will not be published. Required fields are marked *


RockIsStar

RockIsStar

relative, 5px. You are supposed to move 5px instead of making it absolute 5px top from screen!

cindy lou

cindy lou

he answer is A and B; because you are moving the object 5 px relative to its position and because it’s 5px because you are moving the object to a lower position