Which line of code should you use?

You are developing a web application in HTML.
You have the following HTML code.

You need to ensure that the div footer contains the text “All rights reserved”.
Which line of code should you use?

You are developing a web application in HTML.
You have the following HTML code.

You need to ensure that the div footer contains the text “All rights reserved”.
Which line of code should you use?

A.
document(“footer”) = “All rights reserved”;

B.
document(“footer”).innerHTML = “All rights reserved”;

C.
$(“.footer”).value = “All rights reserved”;

D.
$(“#footer”).html(“All rights reserved”);

Explanation:
https://www.codecademy.com/en/forum_questions/557ea03cd3292f72d10006bf



Leave a Reply 7

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


Ahmed Graihy

Ahmed Graihy

this answer is wrong
the right answer is D
$(“#footer”).html(“All rights reserved”);

safaa

safaa

D. $(“#footer”).html(“All rights reserved”);

fbasa

fbasa

answer is D

puvpul

puvpul

Definitely D

asdf

asdf

both is working B + D

asdf

asdf

oh no getElementById is missing….sorry