Every web page is built from three languages. Think of a house:
- HTML is the walls and rooms.
- CSS is the paint and furniture.
- JavaScript is the electricity — things that react when you use them.
Try it yourself
Make a file called page.html, paste this in, and open it in your browser:
<!doctype html>
<h1 id="title">Hello!</h1>
<button id="btn">Click me</button>
<style>
h1 { color: teal; font-family: sans-serif; }
</style>
<script>
document.getElementById('btn').onclick = () => {
document.getElementById('title').textContent = 'You clicked!';
};
</script>
- The
<h1>and<button>are HTML. - The
color: tealis CSS. - The click that changes the text is JavaScript.
What to learn next
- HTML: headings, links, images, forms.
- CSS: flexbox and grid for layout.
- JavaScript: variables, functions and events.
Read how a website works to see how these files reach the browser.