Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Change the HTML of an element

const content=document.querySelector('.content');
content.innerHTML='<h2 style="background:orange; color:blue; font-family:monospace">This is the new Header</h2>';
 
PREVIOUS NEXT
Tagged: #Change #HTML #element
ADD COMMENT
Topic
Name
5+6 =