HTML Introduction
Unlock the core technology that powers billions of websites worldwide
Quick Answer
What is HTML?
HTML (HyperText Markup Language) is the standard language for creating web pages. It uses tags and elements to structure content like headings, paragraphs, links, images, and videos. HTML is not a programming language but a markup language that defines the structure and meaning of web content that browsers render.
HTML serves as the universal language that web browsers understand to display content. From simple blogs to complex web applications, HTML forms the structural backbone of the digital experiences you encounter daily. This lesson reveals how HTML works and why mastering it opens doors to endless creative possibilities.
Defining HTML
HTML represents HyperText Markup Language - the coding system web browsers interpret to render pages.
- HTML provides the universal framework for building web documents
- HTML organizes content into meaningful, hierarchical structures
- HTML uses individual building blocks called elements
- HTML instructions guide browsers in rendering your content correctly
- HTML tags categorize content - identifying headers, paragraphs, navigation links, and more
Building Your First Web Page
Example
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Web Development</title>
</head>
<body>
<h1>Your Journey Begins Here</h1>
<p>This is your first step into web development.</p>
</body>
</html>
Result:
Your Journey Begins Here
This is your first step into web development.
Try it Yourself ›
Launch our interactive coding environment to modify and test this example live:
Try it YourselfCode Breakdown
<!DOCTYPE html>
Announces to browsers that this page follows HTML5 specifications
<html>
Serves as the outermost container wrapping your entire webpage
<head>
Houses configuration details and metadata invisible to visitors
<title>
Determines the text appearing in browser tabs and bookmarks
<body>
Encapsulates all viewable page content including text, images, videos, forms, and interactive elements
<h1>
Creates a prominent headline - typically your page's main title
<p>
Formats text into distinct paragraph blocks
Understanding HTML Elements
Each HTML element consists of three parts: an opening tag, content, and a closing tag:
Element Anatomy
<tagname>Your content appears here...</tagname>
The complete element includes everything from opening to closing tag:
Real Element Examples
<h1>Your Journey Begins Here</h1>
<p>This is your first step into web development.</p>
Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!
Web Browsers
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them correctly.
A browser does not display the HTML tags, but uses them to determine how to display the document:
My First Heading
My first paragraph.
HTML Page Structure
Below is a visualization of an HTML page structure:
Note: The content inside the <body> section will be displayed in a browser. The content inside the <title> element will be shown in the browser's title bar or in the page's tab.
HTML History
Since the early days of the World Wide Web, there have been many versions of HTML:
This tutorial follows the latest HTML5 standard.
Test Your Knowledge
3 practice questions are available. Choose Start practice to try them.
A smaller starting example and practical notes
HTML describes the meaning and structure of a web document. A heading tells the browser that text introduces a topic; a paragraph groups related sentences; a link gives someone a destination. Start with useful content and choose elements that express its purpose.
<main>
<h1>Little projects for the web</h1>
<p>Start with one useful idea and build from there.</p>
<a href="/examples/">Explore the examples</a>
</main>Read the structure
The main element identifies the page's primary content. The h1 introduces that content, and p holds a paragraph. The anchor's href identifies the destination. Tags are instructions to the browser, rather than text displayed as angle brackets. Indentation helps people read the source but usually does not change the rendered layout.
Add presentation and behavior deliberately
CSS controls appearance, including spacing, color and layout. JavaScript can update the document in response to a user action. Neither is needed to make a heading or link work. Keep the basic content usable before adding optional effects. A clear document is a better starting point than a large collection of decorative containers.
Try it
Copy the markup into the HTML editor. Replace the heading and paragraph with your own idea. Change the link to a fragment such as #details and add a section with that id. Confirm that keyboard Tab reaches the link and Enter activates it.