logo

India's First Software Developer Community

Change Html Element in Javascript

Learn How to Change Html Element in Javascript

We are going to use inner javascript in this example

We Type Different text in our html tag and we are going to change that sentence by javascript


<!DOCTYPE html>
<html>
<head>
<title> Javascript | W3CodeIndia </title>
</head>
<body>
<center><h1>Javascript Html Element Change </h1>
<p id="w3code">This is paragraph tag, used for creating paragraph.</p></center>

<script>
document.getElementById("w3code").innerHTML="Welcome To W3Codeindia Javascript Section ";

</script>

</body>
</html>




Subscribe Us :

Chapters :-


Advertisement