Get or set the html of an element

Get the HTML

// Get the HTML
const html = ele.innerHTML;

Set the HTML

// Set the HTML
ele.innerHTML = '<h1>Hello World!</h1>';

More

Previous
Get or set the document title
Next
Get set and remove attributes