HTML stands for Hyper Text Markup Language. HTML provides a way of creating structured documents. These documents are built with elements delineated by tags.
HTML is used to construct a web page, not style or manipulate it. That will come later.
HTML is not a programming language, it’s a markup language made up of tags, also called elements, like <div>
or <span>
.
Each of these ~142 elements are written using angle brackets. Tags such as <p>
surround content
<p>some text</p>
and provide information about document text and may include other tags as sub-elements
<div>
<h1>Page Title</h1>
</div>
These tags can be used for content such as headings, paragraphs, lists, links, quotes and other items. Tags such as <img />
, <input />
, <audio>
directly introduce content into the page. More on that later.
If the element contains other content, it ends with a closing tag.
For example:
<p>I contain content so I need to have a closing tag.</p>
Elements which do not contain content, like images, are self-closing. They do not required a closing tag.
<img src="image.jpg" />
Browsers interpret HTML elements to display a webpage.