Typically, a "Hello World" program is the most basic program you can create for a language.
The purpose of the program is to print the worlds "Hello World" onto the screen.
Below this paragraph, you'll find a small module that Prints "Hello World" to the screen.
There is also source code with an explanation for each line.
has the creation of a button with the "< button >" tag.
On the inside of the first button tag, there is an event trigger labeled "onclick".
As their name implies, event triggers are statements that initiate when a specified event occurs.
This one is triggered by the user clicking on the button.
creates a < h2 > element with the id "demo" for demonstration.
This h2 element is given an id so it can be used later within the code.
is the beginning of our < script > tag,
contains the statement " document.getElementById ".
The " getElementById() " function selects an html element with a specified
id; in this case, we are selecting the h2 element labeled "demo". The next part of the function ".innerHTML = Hello World"
changes the text of our header to the words "Hello World".
Copy and paste the source code into the body of your website to use this program.