What is JavaScript?

JavaScript is the programming language used to add behavior, logic, and data processing to web pages.

What you will learn

HTML, CSS, and JavaScript

HTML
Defines the structure and meaning of the page.
CSS
Controls presentation such as colors, spacing, and layout.
JavaScript
Responds to events, processes data, and changes the page.

For example, JavaScript can update a message when a user clicks a button:

<button id="hello" type="button">Say hello</button>
<p id="message"></p>
<script>
document.querySelector('#hello').addEventListener('click', () => {
  document.querySelector('#message').textContent = 'Hello, JavaScript!';
});
</script>

Where does it run?

Key characteristics

Next steps