Javascript Introduction: Javascript Can Change HTML Content
Javascript Introduction: Javascript Can Change HTML Content
Menu Log in
JavaScript Introduction
❮ Previous Next ❯
The example below "finds" an HTML element (with id="demo"), and changes the
element content (innerHTML) to "Hello JavaScript":
Example
Try it Yourself »
Example
document.getElementById('demo').innerHTML
HTML CSS = 'Hello JavaScript';
Try it Yourself »
Try it Yourself »
Example
document.getElementById("demo").style.fontSize = "35px";
Try
it Yourself
HTML » CSS
Example
document.getElementById("demo").style.display = "none";
Try it Yourself »
Example
document.getElementById("demo").style.display = "block";
Try it Yourself »
JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in
1997.