Write a program to change an HTML element? - DOM

Write a program to change an HTML element?



- HTML DOM uses the JavaScript features, elements and properties to change the inner content of the HTML elements.

- The HTML elements are having the attributes that are used to change the element’s properties like color, shape, etc.

- The example that allows the change is as follows:

<html>
<body>
<script type="text/javascript">
document.body.bgColor="green";
</script>
</body>
</html>
Post your comment