Introduction to HTML

HTML Living Standard

On this page

HTML (HyperText Markup Language) gives a web page its structure. In the example, <h1> marks the main heading and <p> marks a paragraph.

<h1>Learning Center</h1>
<p>Registration opens on Monday.</p>

What to expect Run the example. The browser displays Learning Center as the main heading and the registration notice below it as a paragraph.

How HTML, CSS, and JavaScript work together

Every interactive web page relies on three core layers working together. In the example below:

  • HTML builds the structure (the heading, button, and hidden notice).
  • CSS handles the styling (making the heading teal).
  • JavaScript adds interactivity (revealing the notice when you click the button).

Up next: you’ll save your own index.html file and open it directly in your browser.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Learning Center</title>
  <style>
    h1 { color: teal; }
  </style>
</head>
<body>
  <h1>Learning Center</h1>
  <button type="button" id="show-notice">Show notice</button>
  <p id="notice" hidden>Registration opens on Monday.</p>
  <script>
    document.querySelector("#show-notice").addEventListener("click", () => {
      document.querySelector("#notice").hidden = false;
    });
  </script>
</body>
</html>

What to expect The heading is teal. Click Show notice and the registration notice appears below the button.

Official references