What it is
Markup
HyperText Markup Language—structure and meaning for web pages.

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 with CSS and JavaScript.
Markup
HyperText Markup Language—structure and meaning for web pages.
.html file
Save a file, open it in a browser—no install required.
DOM
Browsers parse tags into a DOM tree and render content on screen.
HTML + CSS + JS
Structure, style, and behavior work together on every modern site.
5 labs
Page structure, headings, links, lists, and character entities.
HTML Basic
Continue to document structure, then CSS and JavaScript.
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.
Every website starts with HTML. Think of it as the skeleton of a webpage—you add muscles and skin with CSS, and movement with JavaScript.
Tags describe structure and meaning—not loops or logic.
Save a .html file and open it in any modern browser.
<nav>, <main>, and <footer> help SEO and accessibility.
HTML5 and the WHATWG living standard keep evolving with the web.
In short: HTML defines what content exists on a page; CSS styles it; JavaScript makes it interactive.
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.
No compiler needed. Save a .html file and open it in a browser. Errors rarely crash anything—browsers do their best to display your page.
Markup 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.
| 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 |
Three technologies—three jobs on every webpage.
<h1>Title</h1>Structure & content — the skeleton of the page
h1 { color: navy; }Presentation & layout — how the page looks
btn.onclick = ...Behavior & logic — how the page responds
Use HTML for structure; reach for CSS and JavaScript when looks and behavior matter.
Headings, paragraphs, links, lists, and forms always start as HTML.
Colors, spacing, responsive layout, and animations belong in stylesheets.
Forms that validate, menus that open, and data that loads without a refresh.
Even in frameworks and SPAs, the markup you ship should stay meaningful.
Key benefit: HTML is easy to start with—basic tags in a few hours—and remains the foundation of every front-end stack.
Five starter snippets. Use View Output to preview here, or open Try It Yourself to edit and run live in the browser.
Every HTML document needs a doctype, html, head, and body.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo</title>
</head>
<body>
<h1>Hello, HTML!</h1>
</body>
</html> <!DOCTYPE html> tells the browser to use standards mode. Metadata lives in <head>; visible content lives in <body>.
Heading levels outline the page; paragraphs hold body text.
<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> Use one <h1> as the main title, then h2–h6 for sections. Screen readers and search engines rely on that outline.
The <a> tag creates hypertext—links between pages.
<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.”
Unordered lists show bullets; ordered lists show numbered steps.
<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> <ul> is for items with no strict order; <ol> is for sequences. Each item is an <li>.
Entities display special characters that are hard to type or reserved in HTML.
<h1>Peso sign (hex): ₱</h1>
<p>Peso sign (decimal): ₱</p>
<p>Copyright: © 2026 CodeToFun</p> Named entities like © and numeric forms like ₱ insert symbols. Always escape < and & in text.
Where HTML shows up every day on the web.
Articles, blogs, docs, and marketing sites start as HTML documents.
Example: a personal portfolio page.
SPAs and frameworks still render HTML in the browser.
Example: React root <div id="root">.
Collect user data with native controls before any JavaScript.
Example: login or contact forms.
Transactional and marketing emails are still built with HTML tables and tags.
Example: order confirmation email.
Semantic landmarks help screen readers navigate your content.
Example: <nav>, <main>, <footer>.
Titles, headings, and meaningful markup help search engines understand pages.
Example: one clear <h1> per page.
Why HTML remains the first skill every web developer learns.
Every site, app shell, and email template uses HTML.
See your page in a browser within minutes—no toolchain required.
Open, free, and supported by every major browser.
Leads naturally to CSS, JavaScript, and modern frameworks.
Small habits that keep HTML readable and accessible.
Master headings, paragraphs, links, and lists before advanced APIs.
Inspect real websites in the browser to see how professionals structure markup.
Use <nav>, <main>, and <article> instead of endless <div>s.
Mistakes that commonly trip up new HTML authors.
Using <table> to position columns breaks accessibility and responsiveness.
→ Use CSS Grid or Flexbox for layout instead.
Jumping from h1 to h4 confuses document outline and screen readers.
→ Keep heading levels sequential unless you have a clear reason.
Tags like <font> and <center> mix style into markup.
→ Move presentation into CSS.
“Click here” tells assistive tech nothing about the destination.
→ Use descriptive phrases that make sense out of context.
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.
<!DOCTYPE html> puts browsers into standards mode.Quick Takeaway: Write semantic HTML first, style with CSS, then add JavaScript only where interactivity is needed.
HTML is the native language of web browsers. Core tags and document structure work across Chrome, Firefox, Safari, Edge, and more. Logos use the shared browser-image-sprite.png sprite from this project.
Save a .html file or serve it from a web server. Browsers parse markup into a DOM and render content without plugins.
Bottom line: Safe for everyday pages. Prefer semantic HTML5 elements and validate edge cases in DevTools when needed.
HTML is the standard markup language for web page structure. Tags and attributes describe content; browsers parse that markup into a DOM and render headings, links, images, and forms on screen.
Continue to HTML Basic for document structure and common tags, then learn CSS for styling and JavaScript for interactivity.
Save files as .html, include <!DOCTYPE html>, and open them in any browser to practice.
<!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>Your gateway to CSS, JavaScript, and every web page on the internet.
Structure & meaning, not logic
BasicsTags become a DOM tree
RuntimeHTML + CSS + JS
StackSemantic tags & living standard
ModernSave & open in any browser
PracticeEvery HTML document starts with <!DOCTYPE html>, wraps content in <html>, and uses tags like <h1>, <p>, and <a> to define structure. Pair HTML with CSS for styling and JavaScript for interactivity. The first web page ever published is still online—Tim Berners-Lee created HTML in 1991 to share research at CERN.
Edit the starter example in the live Try It editor, then continue to HTML Basic.
16 people found this page helpful