You can add an inline script at any place within an HTML document, but most web developers like to place the scripts in three locations.
You have already seen examples of online scripts in exercise 1, exercise 2 and exercise 3.
Step 1: Create a folder called “Exercise-04” on your Windows desktop.
Step 2: Open the folder, “Exercise-04” and create a text file and save it as “main.js“.
Step 4: Close the file.
Step 1: Create a new text document called “ex04.txt” in the Exercise-04 folder on your Windows desktop.
Step 2: Open the text file and insert the following code and save the file as “ex04.html” in the same location.
Your final document should look like the following.
Step 4: Save and close the file.
Output to the Browser