Example 1 — Minimal page structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>Hello, HTML!</h1>
</body>
</html> 
This page is a self-contained introduction to HTML—the foundation of every website. You will understand what HTML is, how browsers read it, and how it works together with CSS and JavaScript.
Markup basics.
Browser parsing.
Hello HTML.
HTML + CSS + JS.
Tim Berners-Lee.
Hands-on tags.
HTML stands for HyperText Markup Language. It is the standard markup language used to create web pages. HTML lets developers build structured documents that web browsers interpret to display text, images, videos, links, forms, and other content.
HTML is not about making pages look pretty—that is CSS’s job. HTML answers the question: what content exists, and what role does each piece play? Headings, paragraphs, navigation, and footers are all defined with HTML tags.
Think of HTML as the skeleton of a webpage. You add muscles and skin with CSS, and movement with JavaScript.
The following example demonstrates a simple HTML page with a heading and paragraph:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Page</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>This is my first web page.</p>
</body>
</html> Save the file as demo.html, double-click it, and your browser will render the heading and paragraph.
HTML is text-based. You write tags in a plain file; the browser downloads that file, parses the markup, builds a DOM (Document Object Model) tree in memory, and renders text, images, and multimedia on screen.
Each tag tells the browser what type of content to expect: an <h1> is a main heading, a <p> is a paragraph, an <img> is an image. Browsers follow open web standards so the same HTML works across Chrome, Firefox, Safari, and Edge.
HTML uses a simple syntax of tags and attributes to describe content and layout. The basic concepts can be learned in just a few hours, and countless free resources (including this tutorial) help you practice.
.html file and open it in a browserMarkup languages use tags to define elements within a document—text, images, hyperlinks, and other content. Tags provide structure and meaning; browsers interpret them to display the page.
HTML is not a programming language. It does not have variables, loops, or conditional logic (that is JavaScript’s role). Other markup languages include XML (structured data) and Markdown (lightweight formatting for docs and README files).
HTML adds text elements and creates the structure of content. Alone, it is not enough to build a professional, fully responsive website—HTML needs Cascading Style Sheets (CSS) and JavaScript.
CSS handles styling: backgrounds, colors, layouts, spacing, and animations. JavaScript adds dynamic behavior: sliders, pop-ups, form validation, and fetching data without reloading the page.
These three technologies are the fundamentals of front-end web development:
| Technology | Role | Analogy |
|---|---|---|
| HTML | Structure & content | Skeleton |
| CSS | Presentation & layout | Skin & clothes |
| JavaScript | Behavior & logic | Muscles & movement |
HTML was first developed in the late 1980s by Tim Berners-Lee at CERN (the European Organization for Nuclear Research). The goal was a standard format for sharing documents across computer systems, which led to the World Wide Web.
HTML 4 introduced closer integration with CSS. HTML5 (circa 2014) added native audio/video, new form controls, semantic elements like <header> and <article>, and improved accessibility. Today HTML remains the universal language of the web, supported by every major browser.
| Version | Year | Highlight |
|---|---|---|
| HTML 1.0 | 1991 | Tim Berners-Lee, basic tags |
| HTML 2.0 | 1995 | Tables, forms |
| HTML 3.2 | 1997 | Frames, background images |
| HTML 4.0 | 1997 | CSS integration, accessibility |
| HTML 4.01 | 1999 | Minor spec update |
| XHTML | 2000 | Stricter XML-based HTML |
| HTML5 | 2014 | Semantic tags, video, canvas, APIs |
| Living Standard | ongoing | WHATWG continuous updates |
| Concept | What it does |
|---|---|
| Elements & tags | <p>...</p> wrap content |
| Attributes | href, src, alt add extra info |
| Document structure | <head> metadata, <body> visible content |
| Semantic HTML | <nav>, <main>, <footer> describe meaning |
| Links & media | <a>, <img>, <video> |
| Forms | <input>, <button> collect user data |
| Task | Example |
|---|---|
| Main heading | <h1>Title</h1> |
| Paragraph | <p>Hello world.</p> |
| Link | <a href="/css">Learn CSS</a> |
| Image | <img src="photo.jpg" alt="Description"> |
| Unordered list | <ul><li>Item</li></ul> |
| Character entity | © 2026 → © 2026 |
Five starter snippets. Use View Output to preview here, or open Try It Yourself to edit and run live in the browser.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>Hello, HTML!</h1>
</body>
</html> <h1>Main Title</h1>
<h2>Section</h2>
<p>HTML uses heading levels h1–h6 for document outline.</p>
<p>Use one <strong>h1</strong> per page for accessibility.</p> <p>
Visit <a href="https://example.com">Example.com</a>
to learn more.
</p> The href attribute sets the destination URL. Use descriptive link text instead of “click here.”
<h2>Shopping list</h2>
<ul>
<li>Milk</li>
<li>Bread</li>
<li>Eggs</li>
</ul>
<h2>Steps</h2>
<ol>
<li>Open editor</li>
<li>Write HTML</li>
<li>Save as .html</li>
</ol> <h1>Peso sign (hex): ₱</h1>
<p>Peso sign (decimal): ₱</p>
<p>Copyright: © 2026 CodeToFun</p> Entities display special characters that are hard to type or reserved in HTML (like < and &).
You open a URL; the browser fetches the HTML file from a server or local disk.
The browser reads tags and builds the DOM tree in memory.
Stylesheets paint the page; scripts add interactivity.
Users see headings, links, images, and forms rendered as a complete webpage.
.html and open them in any browser to start learning.<!DOCTYPE html><main>, <nav>, <article>)lang on <html> and charset in <head>alt text on every <img>h1 then h4) without reason<font> or <center>The first web page ever published is still online. Tim Berners-Lee created HTML in 1991 to share research at CERN. That simple idea—linked documents anyone could read in a browser—grew into the billions of pages on the web today.
Edit any example from this page in the live Try It editor.
16 people found this page helpful