Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

HTML is the markup language that gives web content structure and meaning. It identifies headings, paragraphs, links, images, lists, forms, navigation, and other parts of a document so browsers, search engines, and assistive technologies can interpret them. HTML is not a programming language: CSS controls presentation, while JavaScript usually provides interaction and application logic.

This introduction explains the basic document structure, HTML syntax, semantic elements, common mistakes, and how to create and open your first page.

What is HTML?

HTML stands for HyperText Markup Language. “HyperText” refers to documents connected by links, while “markup language” describes a system for annotating content with structure and meaning.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

HTML is not merely a set of instructions for making text look a particular way. An <h1> element means “top-level heading,” whether it appears large, small, bold, or otherwise styled. A paragraph is marked as a paragraph, a link as a link, and a button as an action control. Browsers apply default styles, but visual design belongs primarily to CSS.

#1 Best Overall
Sale
Nulaxy Ergonomic Adjustable Laptop Stand for Desk, Dual Foldable Computer Riser with Advanced Heat-Vent, Heavy-Duty Portable Notebook Holder for Posture Correction, Compatible with Mac 10-16" Laptops
  • Ergonomic Posture Correction: Designed to elevate your laptop to the perfect eye level, this adjustable laptop stand significantly reduces neck, shoulder, and spinal fatigue. Transform your desk into a healthier workstation, ideal for long hours of typing, Zoom meetings, or gaming.
  • Unshakable Dual-Rod Stability: Unlike single-hinge models, our stand features a highly engineered dual-support rod mechanism. It perfectly distributes weight to ensure a 100% wobble-free typing experience, safely supporting heavy-duty devices up to 22 lbs (10kg).
  • Advanced Thermal Cooling Panel: Maximize your device's performance. The unique geometric heat-vent design on the upper panel provides superior airflow compared to standard solid stands. This continuous heat dissipation prevents your laptop from thermal throttling and hardware damage during intensive tasks.
  • Universal 10-16” Compatibility: A versatile computer riser that seamlessly fits all 10 to 16-inch laptops. Broadly compatible with MacBook Pro/Air, Dell XPS, HP, Lenovo, ASUS, Chromebook, and large gaming laptops. The anti-slip silicone pads firmly grip your device and protect it from scratches.
  • Foldable, Portable & Ready to Go: Maximize your productivity anywhere. The dual-foldable design allows the stand to collapse completely flat in seconds. Easily slip it into your backpack or briefcase, making it the ultimate portable office accessory for business trips, cafes, or hybrid work setups.

A useful division of responsibilities is:

  • HTML: document structure, content, and semantics.
  • CSS: colors, typography, spacing, responsive layout, and visual presentation.
  • JavaScript: behavior, calculations, state changes, event handling, and application logic.

When a browser parses HTML, it creates an in-memory tree called the Document Object Model (DOM). CSS and JavaScript can then work with that tree. The HTML source and the final DOM are not always identical because browsers can repair some malformed markup during parsing.

The WHATWG HTML introduction provides the formal background, while SitePoint’s HTML introduction is a useful beginner-oriented overview.

Why HTML still matters

It gives content structure

HTML organizes a document into a meaningful hierarchy: headings introduce topics, paragraphs hold prose, lists group related items, and links connect resources. That structure makes a page easier to maintain and gives other software something reliable to interpret.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

It supports accessibility

Semantic HTML gives screen readers and other assistive technologies useful information about a page. Correct headings help users navigate; labels identify form controls; buttons expose their intended role; and meaningful alternative text explains images when they cannot be seen.

Semantic HTML supports accessibility, but it does not guarantee it. Keyboard operation, focus management, color contrast, error messages, motion, timing, and testing with assistive technologies also matter.

It works across many tools

Modern browsers widely support HTML, and HTML documents can also be processed by search engines, reader modes, accessibility tools, web views, and other software. Individual features and rendering details can still vary between browsers, platforms, embedded environments, and form controls.

Rank #2
Sale
BESIGN LS03 Aluminum Laptop Stand, Ergonomic Detachable Computer Stand, Notebook Riser, Laptop Mount Compatible with Air, Pro, Dell, HP, Lenovo More 10-15.6" Laptops, Silver
  • Broad Compatibility: Besign LS03 Laptop Mount is compatible with all laptops from 10''-15.6'', such as Air 13, Pro 13 / 15 / 2018 / 2017 / 2016, Lenovo ThinkPad, Dell, HP, ASUS, Chromebook, and other notebooks.
  • Ergonomic Design: This LS03 Laptop Stand could elevate your laptop by 6’’ to a perfect viewing level, help you improve your posture and reduce neck and shoulder pain. This laptop stand is super easy to detach and assemble.
  • Stable And Protective: This laptop stand is made of premium Aluminum alloy, it is sturdy, support up to 8.8 lbs(4kg), no worry any wobble at all; the rubber on the holder hands sticks tightly, ensure your laptop stable on the stand and prevent any scratches.
  • Keep Laptop Cool: the open aluminum design provides good ventilation and airflow to prevent your laptop from overheating. It folds flat if you need to store it, create extra space on your desk and keep your desk clean and organized.
  • Easy to Use: thanks to the detachable design, you could assemble it very easily it 3 steps.

It enables progressive enhancement

A page can provide useful content and navigation with HTML before CSS or JavaScript loads. CSS can improve its appearance, and JavaScript can add richer behavior without making basic information dependent on a script-heavy application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Meaningful structure may help search engines understand content, but valid HTML alone does not guarantee search rankings or make a page automatically SEO-friendly.

Your first HTML document

Create a plain-text file containing this code:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>My first webpage</title>
  </head>
  <body>
    <h1>Hello, HTML</h1>
    <p>This is my first webpage.</p>
  </body>
</html>

Here is what each part does:

  • <!doctype html> is a doctype declaration. It is not an element. In modern browsers, it activates standards mode.
  • <html lang="en"> is the root element. Replace en with the document’s actual language, such as fr or hi.
  • <head> contains metadata and resource references rather than the main visible content.
  • <meta charset="utf-8"> declares UTF-8 character encoding, which supports a wide range of characters and scripts.
  • <meta name="viewport" ...> helps the page behave properly on mobile browsers. It is practical webpage boilerplate, not a universal requirement for every HTML document.
  • <title> supplies the document title shown in the browser tab and commonly used for bookmarks and search-result titles.
  • <body> contains the document’s rendered content.
  • <h1> marks a top-level heading; it is not simply a command for making text large.
  • <p> marks a paragraph.

Tags, elements, and attributes

Consider this link:

<a href="https://example.com">Visit Example</a>
  • <a> is the start tag and </a> is the end tag.
  • The complete construct, including its text, is an element.
  • href="https://example.com" is an attribute.
  • Visit Example is the element’s text content.

Attributes modify an element or provide information needed to use it. For example:

<img src="logo.png" alt="Company logo">

The src attribute identifies the image resource. The alt attribute supplies alternative text. The <img> element is a void element: it cannot contain child content and does not need a closing tag.

Other common void elements include <br> and <hr>. In ordinary HTML syntax, <br> and <br /> have the same practical effect. The slash is not what makes the element void. HTML and XML use different syntax and parsing rules, so do not describe every void element as “self-closing.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Nesting and the document tree

Elements can contain other elements, but they must be nested correctly:

Rank #3
Sale
LOXP Adjustable Laptop Stand, Computer Stand with 360 Rotating Base
  • ✔️[Foldabe & Protable] - Foldable laptop stand for desk & Protable computer stand, It combines the advantages of market brackets, convenient travel laptop stand. Easy to use. Suitable for working at home, office and outdoor, improve comfort.
  • ✔️[360°Rotation] - The computer stand with 360° rotating base, 360° rotation connected with the base is more flexible, the computer stand allows you to rotate the laptop to any angle.
  • ✔️[Stable & Durable] - The Computer stand is made of one-piece fiber metal material, which is more durable and stable than ordinary aluminum alloy computer stands. The upgraded rotating base makes the stand performance more stable, and the non-slip silicone protects the laptop from sliding.Only supports laptops up to 16 inches.
  • ✔️[Ergonmic Desing] - You can freely adjust the height and angle of the laptop stand to keep it at eye level, which helps to reduce the pressure on your body while working. Whether sitting or standing, there is a comfortable angle.
  • ✔️[Wide Compatibility] - Our laptop stand is compatible with all laptops from 10-16 inches, such as MacBook Air/Pro, Google PixelBook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc. It is an ideal companion for computer workers.
<p>This is <strong>important</strong>.</p>

This is incorrect because the elements overlap:

<p>This is <strong>important</p></strong>

Browsers often recover from errors, so faulty HTML may appear to work. That does not mean the source is correct: recovery can produce an unexpected DOM, styling behavior, accessibility tree, or script result.

Semantic HTML

Prefer an element that communicates purpose over a generic container. A small page might look like this:

<header>
  <h1>Garden Journal</h1>
</header>
<nav aria-label="Primary navigation">
  <a href="/plants.html">Plants</a>
  <a href="/notes.html">Notes</a>
</nav>
<main>
  <article>
    <h2>Growing herbs indoors</h2>
    <p>Basil and mint grow well on a bright windowsill.</p>
  </article>
</main>
<footer>Copyright 2026 Garden Journal</footer>

Elements such as <header>, <nav>, <main>, <article>, <section>, and <footer> communicate the purpose of page regions. This can improve accessibility, maintainability, content structure, and compatibility with reader modes and other tools.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use elements according to their meaning:

  • Use <button> for an action on the current page.
  • Use <a href="..."> to navigate to a resource.
  • Use headings in a meaningful hierarchy, not just to obtain a particular font size.
  • Use <label> with form controls.
  • Use lists for list-like content.
  • Use <div> only when no more meaningful element fits.
  • Do not use repeated <br> elements to create layout; use CSS.

For example:

<a href="/contact.html">Contact us</a>
<button type="button">Open menu</button>

Styling a link to look like a button does not change its semantics or behavior.

What belongs in the head and body?

Location Typical contents
<head> Title, character encoding, metadata, stylesheet links, icons, and some scripts
<body> Headings, paragraphs, navigation, images, forms, articles, buttons, and visible application content

“Not visible” does not mean “unimportant.” The title, language, encoding, viewport information, and linked stylesheets affect usability, accessibility, indexing, and rendering.

How to create and open an HTML file

  1. Open a plain-text editor such as Notepad, TextEdit in plain-text mode, or a code editor. Do not use a rich-text document editor.
  2. Paste the example document and save it as index.html.
  3. Check that the file is not actually named index.html.txt. On some systems, file extensions are hidden.
  4. Open the file in a modern browser, or drag it into a browser window.
  5. Edit the source, save it, and reload the browser page to see the change.

A simple project can use this structure:

my-page/
├── index.html
├── styles.css
└── images/

You do not need special software, paid hosting, or a development server to learn basic HTML. Any plain-text editor is enough. A code editor such as Visual Studio Code can add syntax highlighting, autocomplete, bracket matching, file browsing, and extensions, but those conveniences are optional.

Rank #4
Gogoonike Adjustable Laptop Stand for Desk, Metal Laptop Riser Holder
  • 【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
  • 【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
  • 【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
  • 【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
  • 【Broad Compatibility】:Our desktop book stand is compatible with all laptops from 10-15.6 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.

A local development server becomes useful later for fetch requests, ES modules, server-side code, routing, build tools, frameworks, and team projects. It is not a prerequisite for a first page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How browsers process HTML

The phrase “the browser reads HTML line by line” is a useful oversimplification, but not an accurate description of the complete process. A practical model is:

  1. The browser opens a local file or retrieves a resource from a server.
  2. It determines how to decode the incoming bytes.
  3. It parses the HTML source.
  4. It constructs a DOM tree of elements and text.
  5. It loads referenced resources such as images, stylesheets, and scripts.
  6. CSS and layout calculations determine presentation.
  7. JavaScript may modify the DOM, styles, and page state.

Browser engines do much more than this simplified model suggests, but it explains why a typo can affect both the visible page and the DOM inspected by developer tools.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common beginner errors

Symptom Likely cause Fix
The page opens as plain text or shows HTML code The file was saved as rich text, has the wrong extension, or is being opened in an editor Save as plain text with the exact .html extension and open it in a browser
An image is missing The filename, folder, capitalization, or path is wrong Check that the file exists and use a web path such as images/logo.png, not imageslogo.png
Text or layout does not change The file was not saved, the browser was not refreshed, or a different copy was opened Save, reload, and verify the file location and URL
Markup behaves strangely A non-void element is not closed or elements are incorrectly nested Match tags and nest them correctly
A link does not work href is missing, misspelled, or attached to the wrong element Use an anchor with a valid href, such as <a href="/contact.html">
A meaningful image has no description The alt attribute is missing Add concise alternative text; use alt="" for genuinely decorative images
Spacing looks wrong <br> is being used as a layout tool Use CSS for spacing and layout

Attribute values should normally be quoted, especially when they contain spaces or special characters. Also remember that browser error recovery is not proof that your markup is correct.

Checking and debugging HTML

Use several checks rather than relying on a single measure:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Choose View Source to see the original HTML source delivered or opened by the browser.
  • Open developer tools and inspect the parsed DOM, computed styles, console messages, and network requests.
  • Use a standards validator or conformance checker to find structural and syntax errors. The WHATWG developer edition includes guidance about validators and authoring conformance.
  • Test keyboard navigation and zoom.
  • When progressive enhancement matters, check whether useful content remains available with images disabled or JavaScript unavailable.

A document with no validator errors can still have poor heading structure, missing form labels, inadequate contrast, misleading link text, inaccessible keyboard behavior, unoptimized images, or weak content. Validation is a diagnostic tool, not a complete quality certificate.

Best Value
Tonmom Adjustable Laptop Stand for Desk, Metal Foldable Laptop Riser
  • ✅【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
  • ✅【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
  • ✅【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
  • ✅【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
  • ✅【Broad Compatibility】:Our laptop holder is compatible with all laptops from 10-17.3 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.

HTML’s history and the current standard

HTML began as a way to structure and link documents. HTML 2.0, HTML 3.2, and HTML 4.01 are historical milestones. XHTML applied XML syntax and processing rules to HTML-related documents, while HTML5 introduced or standardized many capabilities associated with modern HTML.

Today, the normal technical reference is the WHATWG HTML Living Standard. HTML is continuously maintained rather than released as a succession of formally numbered editions called HTML6 or HTML7. “HTML5” remains a common informal label for modern web development, but it should not be treated as the latest frozen version.

The WHATWG introduction explains the historical split between a planned finished HTML5 edition and the continuously maintained Living Standard, as well as the later move toward one shared HTML standard.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What HTML cannot do by itself

HTML-only pages are real webpages and are an excellent way to learn structure and semantics. They do not, by themselves, provide intended visual design, complex interaction, server-side processing, databases, authentication, or deployment infrastructure.

  • Add CSS for presentation and responsive layout.
  • Add JavaScript for client-side behavior and DOM updates.
  • Use server-side code for processing requests and generating dynamic responses.
  • Use a database to store and retrieve persistent application data.
  • Use hosting or another delivery service when you want other people to access the page online.

HTML does not become useful only after these technologies are added. A well-structured HTML document is the foundation on which they build.

A sensible learning path

  1. Learn elements, attributes, text, links, and nesting.
  2. Add images, audio, video, lists, and tables.
  3. Practice semantic page structure and heading hierarchy.
  4. Learn forms, labels, controls, and validation.
  5. Study accessibility and test with a keyboard, zoom, and assistive technology where possible.
  6. Learn CSS fundamentals and responsive layout.
  7. Learn JavaScript and how it works with the DOM.
  8. Use validation, developer tools, testing, and deployment workflows.

MDN Web Docs’ HTML material is a practical learning and reference resource. The WHATWG HTML Living Standard is authoritative but considerably more detailed than a first tutorial. If you prefer a structured library of courses and books, SitePoint also offers SitePoint Premium; a paid membership is not necessary for creating or viewing a first HTML page.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.