HTML

HTML, short for HyperText Markup Language, is the foundation of all web pages. It was created by Tim Berneres-Lee in 1993 to define the structure of a web page. Without it, you wouldn’t be able to organize text or add images or videos to your pages. HTML is the beginning of everything you need to know to make your first website.

HTML Structure

HTML is organized into a family tree structure. HTML elements can have parents, grandparents, siblings, children, grandchildren, etc.

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<div>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
</div>
</body>
</html>

The <!DOCTYPE> declaration tells the browser that a given file is a markup .html file and that a set of web standards must be applied to it. It is the first line of code that goes at the top of every HTML or XHTML file.

Note: <!DOCTYPE> is not an element or a tag.

HTML Concepts

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn HTML on Codecademy