HTML (HyperText Markup Language) is the foundation of web development. It lets you structure content on the web—headings, paragraphs, links, images, and more.
Understanding HTML is essential for anyone interested in building websites. Every page you visit is built on HTML, even when CSS and JavaScript add style and interactivity on top.
What You’ll Learn
01
Structure
Document layout.
02
Tags
Opening & closing.
03
Attributes
Extra properties.
04
Text
Headings & lists.
05
Media
Links & images.
06
Practice
Build a page.
Fundamentals
What Is HTML?
HTML is a markup language used to create web pages. It uses tags to structure text, multimedia, and other elements. HTML files are plain text—browsers read them and render the content for users to see.
Think of HTML as the skeleton of a website. CSS adds visual style; JavaScript adds behavior. But without HTML, there is nothing for those technologies to work with.
💡
Beginner Tip
You do not compile HTML. Save a .html file and open it in any browser. That is your first web page—no server required for local practice.
Structure
Basic HTML Document Structure
An HTML document has a predictable layout. Here is the smallest useful HTML5 page:
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
href makes text clickable; src and alt load and describe the image.
Example 6 — My First Web Page
A complete beginner page combining everything from this tutorial:
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<p>This is a basic HTML example.</p>
<h2>Things I Like:</h2>
<ul>
<li>Coding</li>
<li>Web Development</li>
<li>Coffee</li>
</ul>
<p>Visit my <a href="https://example.com">website</a> for more information.</p>
</body>
</html>
This is a real publishable page: proper head metadata, structured headings, a list, and a link. Save it as index.html and open it in your browser.
Compatibility
Universal Browser Support
Core HTML elements—headings, paragraphs, lists, links, and images—have been supported in every browser for decades. The HTML5 doctype and meta tags work in all modern browsers.
✓ Baseline · Since HTML
Basic HTML elements
Every browser renders standard HTML tags the same way. You do not need polyfills or fallbacks for the fundamentals covered in this tutorial.
100%Core tag support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
Basic HTML elementsUniversal
Bottom line: Write HTML once; it works in Chrome, Firefox, Safari, Edge, and mobile browsers.
Wrap Up
Conclusion
HTML is the foundation of web development. It provides the structure every page needs. Mastering basic tags and attributes is your first step toward becoming a web developer.
Once you are comfortable with HTML, explore HTML Editors to pick a tool, then dive into HTML Tags and HTML Attributes for deeper reference guides. CSS and JavaScript come next for styling and interactivity.
HTML (HyperText Markup Language) is the standard language for creating web pages. It uses tags to mark up content—headings, paragraphs, links, images—so browsers know how to display each part of the page.
No. HTML is a markup language—it describes structure and meaning, not logic. Programming languages like JavaScript or Python run instructions; HTML tells the browser what each piece of content is.
No. You can write HTML in any text editor and save the file with a .html extension. Dedicated code editors add syntax highlighting and preview, which makes learning easier—but they are optional.
A tag is the markup syntax, such as <p> or </p>. An element is the complete unit: opening tag, content, and closing tag—or a void tag like <img>. In everyday speech, people often use both words to mean the same thing.
It tells the browser this document follows the HTML5 standard. Always put it on the first line so the browser renders your page in standards mode instead of outdated compatibility quirks.
Save your file as something like index.html, then double-click it or drag it into a browser window. You can also use an editor with live preview, or upload the file to a web host when you are ready to share it online.
Did you know?
The first version of HTML was created by Tim Berners-Lee in 1991 with about 18 tags. Today’s HTML5 standard has roughly 100+ elements, but beginners only need a dozen to build useful pages. The tags in this tutorial cover most everyday websites.