Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.3 KB

File metadata and controls

49 lines (34 loc) · 1.3 KB

JavaScript Hello World

JavaScript is a scripting computer programming language commonly used to create interactive effects within web browsers.

This sample file will display a "Hello World!" message when the button is clicked.

Steps

  1. Create a new HTML file and name it hello-world.html.

  2. Add the following HTML:

    <!doctype html>
    <html>
    <head>
        <title>JavaScript Hello World!</title>
    </head>
    <body>
    
        <h1>JavaScript Hello World!</h1>
    
        <button onclick="alert('Hello World!');">Clck Me</button>
    
    </body>
    </html>
  3. Save the file and test in a browser.

  4. Try uploading this file to your hosting and then test it using your domain name. It will look something like this:

    http://www.domain.com/folder/hello-world.html
    

Full tutorial URL:
https://codeadam.ca/learning/javascript-hello-world.html


Repo Resources