Which property is used to define the HTML content to an HTML element with a specific id?

10. Which property is used to define the HTML content to an HTML element with a specific id?

  1. innerText
  2. innerContent
  3. elementText
  4. innerHTML

Answer: D) innerHTML

Explanation:

The innerHTML is the property that defined HTML content.

Example:

document.getElementById("notif").innerHTML = "New course launched";

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.