AD JB Toolbox 01 EN

HTML Tutorial / What Is HTML and What Does It Do on a Web Page?

HTML (HyperText Markup Language) gives web page content its structure and meaning. It identifies headings, paragraphs, lists, links, and other parts of a document so a browser can present them. CSS mainly controls appearance and layout, while JavaScript can add behavior in response to user actions.

What is HTML?

HTML is a markup language that describes what each part of a document is. The same words might be a heading, an ordinary paragraph, or a link to another page; HTML elements distinguish those roles. Links also let HTML documents connect to one another across the web.

HTML is not primarily a language for calculations or conditional logic. Its central job is to give content structure and meaning. The WHATWG HTML Standard introduction explains the language and how its elements work.

What does HTML do on a web page?

A web page may contain headings, body text, navigation links, images, and forms. HTML uses elements appropriate to each kind of content and expresses how the parts relate to one another.

  • Identifies content: h1–h6 mark headings, p marks paragraphs, and ul or ol marks lists.
  • Organizes the document: Elements can distinguish a header, navigation area, and main content.
  • Connects pages and accepts input: a creates links; form and input elements let users submit information.

That structure helps browsers and assistive technologies interpret the page. Choose an element for the role of the content, not merely for its default appearance.

How do HTML, CSS, and JavaScript differ?

They have different primary roles. HTML defines content and its meaning. CSS controls presentation such as colors, fonts, spacing, and layout. JavaScript can respond to clicks or input and change the page.

Diagram comparing HTML structure, CSS appearance, and JavaScript behavior

This division is a useful starting point, not a rigid boundary: some HTML elements provide built-in interaction, and CSS can change appearance in response to states or animate it. When learning HTML, focus first on marking up content correctly.

What does HTML code look like in a browser?

In this fragment, h1 marks a heading, p marks a paragraph, and ul with li marks a list.

<h1>Today’s notes</h1>
<p>HTML structures content.</p>
<ul>
  <li>Heading</li>
  <li>Paragraph</li>
</ul>

The browser interprets these elements and displays a heading, a paragraph, and a bulleted list. The diagram pairs the code with an example result. Actual fonts and spacing depend on the browser and any CSS applied to the page.

HTML heading, paragraph, and list code shown beside its browser output

Try making a simple HTML file

Add the basic document structure to the fragment above and you can open it directly in a browser. Paste the following into a text editor, save it as index.html using UTF-8 encoding, and open the file in a browser.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Today’s notes</title>
  </head>
  <body>
    <h1>Today’s notes</h1>
    <p>HTML structures content.</p>
    <ul>
      <li>Heading</li>
      <li>Paragraph</li>
    </ul>
  </body>
</html>

The head contains information such as the document title and character encoding. The body contains the page’s main content. Even without added CSS, a browser displays the content using its default styles.

More in This Category
HTML Tutorial / Images: img, Alt Text, and Dimensions

HTML Tutorial / Images: img, Alt Text, and Dimensions

Add an image with HTML img, write useful alternative text, and set width and height correctly. A downloadable example helps you test file paths and sizing.

HTML Tutorial / Accessible Tables: caption, scope, and Spanning Cells

HTML Tutorial / Accessible Tables: caption, scope, and Spanning Cells

Make table headings and data relationships clear with caption, th, and scope, and learn when colspan or rowspan makes a table harder to read.

HTML Tutorial / Responsive Images: srcset, sizes, and picture

HTML Tutorial / Responsive Images: srcset, sizes, and picture

Offer image resolutions with srcset and sizes, and switch crops with picture. Downloadable files let you test the examples in a browser.

HTML Tutorial / Explain Forms with fieldset, legend, and autocomplete

HTML Tutorial / Explain Forms with fieldset, legend, and autocomplete

Group related controls with fieldset and legend, and use suitable autocomplete tokens to describe the purpose of input fields.

HTML Tutorial / Text Semantics: Emphasis, Quotations, Abbreviations, and Code

HTML Tutorial / Text Semantics: Emphasis, Quotations, Abbreviations, and Code

Learn when to use HTML em, strong, q, blockquote, abbr, code, and kbd. Examples show how each element conveys meaning rather than just changing the appearance of text.

HTML Tutorial / Table Basics: table, tr, th, and td

HTML Tutorial / Table Basics: table, tr, th, and td

Build a basic HTML data table with rows and header or data cells, then organize its headings and body without using tables for page layout.

HTML Tutorial / Connect Labels and Inputs Correctly

HTML Tutorial / Connect Labels and Inputs Correctly

Connect labels to inputs with for and id, distinguish id from submitted name, and learn why placeholder text cannot replace a label.

HTML Tutorial / Form Validation with required, Length, and Range Limits

HTML Tutorial / Form Validation with required, Length, and Range Limits

Apply built-in required, length, and numeric constraints, test error states, and understand why server-side validation remains necessary.

HTML Tutorial / Choose Input Types for Email, Numbers, Dates, and Choices

HTML Tutorial / Choose Input Types for Email, Numbers, Dates, and Choices

Choose input types based on the value being collected and understand how checkboxes and radio groups behave when submitted.

HTML Tutorial / Group Images and Captions with figure and figcaption

HTML Tutorial / Group Images and Captions with figure and figcaption

Use figure and figcaption to keep an image and its visible explanation together, and distinguish captions from image alt text.