HTML CSS JavaScript SEO Python Posts Privacy About Contact

JavaScript Introduction

JavaScript is the world's most popular programming language and the programming language of the Web.

JavaScript can update and change both HTML and CSS. It can calculate, manipulate, and validate data. JavaScript runs directly in the browser — no installation needed!

JavaScript is one of the 3 languages all web developers must learn:

  1. HTML — to define the content of web pages
  2. CSS — to specify the layout of web pages
  3. JavaScript — to program the behavior of web pages

Try It — JavaScript in Action

Click the JS tab to see the script. Then click Run and try clicking the button!

Preview

What Can JavaScript Do?

CapabilityExample
Change HTML contentelement.innerHTML = "New text"
Change CSS styleselement.style.color = "red"
React to user actionsButton clicks, keyboard input
Validate form dataCheck if an email looks correct
Fetch data from serversLoad new content without refreshing

Tip: Open the JS tab in the editor and modify the changeText() function to display your own custom message!