Solved

Which of the Following Code Creates a List Item Element

Question 8

Multiple Choice

Which of the following code creates a list item element by using the setAttribute () method to set the ID value of the list item to the text string "list1"?


A) var listElem = document.createElement("li") ; listElem.setAttribute("id","list1") ;
B) var listElem = document.createElement("list1") ; listElem.setAttribute("id") ;
C) var listElem = document.Element("li") ; listElem.setAttribute("list1") ;
D) var listElem = document.createElement("li") ; listElem.getAttribute("id",list1) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions