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:
Verified
Q43: William has created a page view style
Q44: The _ style rule is described by
Q45: Identify the syntax to remove a rule
Q46: Identify the syntax for adding new rules
Q47: The _ property represents the object collection
Q49: Which of the following methods returns the
Q50: Identify the HTML code to create form
Q51: Identify the integer value returned by the
Q52: Identify the correct syntax to move up
Q53: Which of the following codes inserts text
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents