LibraryHTMLMeet HTML

Meet HTML

Understand what HTML does and build your first meaningful web page.

Updated Tested with HTML Living Standard

HTML gives web content its structure and meaning. A browser reads elements such as headings, paragraphs, links, and buttons, then builds a document that people and assistive technology can navigate.

Start coding HTML

You only need a text editor and a browser.

  • Create a folder named first-site.
  • Inside it, create a plain-text file named index.html.
  • Paste the example below and save the file.
  • Double-click index.html, or drag it into a browser window.
  • Keep the editor and browser side by side; save, then refresh after each change.

Your first page

Create index.html, add a heading and a paragraph, then open the file in a browser.

index.html
<h1>My learning journal</h1>
<p>Today I built my first page.</p>

An element usually has an opening tag, content, and a closing tag. The tags describe the role of the content; they are not instructions for how it should look.

Elements and attributes

Attributes add information to an element. The href attribute tells a link where it should go.

index.html
<a href="https://developer.mozilla.org/">Read the web docs</a>

A useful workflow

  • Edit the HTML file in a code editor.
  • Save the file and refresh the browser.
  • Inspect the page with browser developer tools.
  • Validate the document when something behaves unexpectedly.

Keep this

HTML describes content. Start with the smallest meaningful structure, use lowercase tag names for consistency, and let the browser show you the result often.

Your place is saved on this device.