How to start

The first HTML page

The first page is one file. Name it index.html. The browser opens it by itself. You do not need a framework, a library, or a site builder first.

Three places stand inside the file. html holds all of it. head keeps the name of the page. body is what the person sees. Put the visible text inside body.

Save the file and press it twice. The browser opens. If the text shows, the page is ready. Color and layout come later. That is CSS.

  • Save the file on the desktop so you can find it.
  • <h1>Hello</h1> is a heading. <p>This is the first page.</p> is a paragraph.
  • The file must end in .html. A .txt file opens as code in the browser.
  • If a picture sits in the same folder, img points at its name.
  • You can put a button. It needs JavaScript before it does work.
  • Do not copy a ready template. Write these three lines yourself first.

If the page does not open, look at the end of the file name. If it is not .html, the browser does not treat it as a page.

Tool for this topic

Related guides

About this tool

The first HTML page is a single file that does not need a framework, a library, or a site builder. It serves as the absolute starting point for web development, containing basic structural tags like html, head, and body that instruct the browser on how to display content.

People need this foundational file when they begin learning web programming or want to understand how browsers read documents. Writing these initial lines yourself rather than copying a ready template ensures you grasp the direct connection between the file on your desktop and the visible output.

How to use it

  1. Name your file index.html and save it on the desktop.
  2. Place the html, head, and body tags inside the file structure.
  3. Add visible content like headings and paragraphs inside the body section.
  4. Save the file and click it twice so the browser opens it.

Common uses

Frequently asked questions

Why won't the page open correctly?

Look at the end of the file name. If it is not .html, the browser does not treat it as a page.

Do I need any special software?

No frameworks, libraries, or site builders are needed first. A basic text editor and a browser are enough.

Can I add interactive buttons?

You can put a button on the page, but it needs JavaScript before it does any work.