What is HTML?
HTML is a markup language for describing web documents (web pages).
- HTML stands for Hyper Text Markup Language
- A markup language is a set of markup tags
- HTML documents are described by HTML tags
- Each HTML tag describes different document content
Small HTML document
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Try it Yourself »
- The DOCTYPE declaration defines the document type
- The text between <html> and </html> describes the web document
- The text between <body> and </body> describes the visible page content
- The text between <h1> and </h1> describes a heading
- The text between <p> and </p> describes paragraph
Using the description, a web browser can display a document with a heading and a paragraph.
HTML tags are keywords (tag names) surrounded by angle brackets:
- HTML tags normally come in pairs like <p> and </p>
- The first tag in a pair is the start tag, the second tag is the end tag
- The end tag is written like the start tag, but with a slash before the tag name
|The start tag is often called the opening tag. The end tag is often called the closing tag.|
The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.
The browser does not display the HTML tags, but uses them to determine how to display the document:
HTML Page Structure
Below is a visualization of an HTML page structure:
Since the early days of the web, there have been many versions of HTML:
The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration helps the browser to display a web page correctly.
There are many different documents on the web, and a browser can only display an HTML page correctly if it knows the HTML version and type.
The doctype declaration is not case sensitive. All these are acceptable:
|All tutorials and examples at W3Schools use HTML5.|
Thank You For Helping Us!
Your message has been sent to W3Schools.