The structure of HTML has to be properly followed and maintained for a web browser to correctly read the HTML document. Without its structure and proper syntax, errors can easily cause browsers to show broken pages to the end user.

How HTML is structured

HTML is structured by using HTML elements, which enclose the content intended for the user. These HTML elements each describe or identify a purpose for their content, be it to state that a certain portion of the web page is a paragraph or that there is an image placed at this point in a web page.

The elements themselves comprise of HTML tags, markup contained within angled brackets. For example, the element to denote an HTML document itself might be written <!DOCTYPE html>.

What is HTML

HTML Tag Pairs

HTML tags most commonly come in pairs, for example <p> and </p> which enclose a paragraph. However some HTML tags can be found on their own, these are commonly known as empty elements and are unpaired, an example being the <img> tag for an image element.

The terms tag and element are often used interchangeably by web designers, however by definition; an element comprises the opening tag, closing tag (if paired) AND any web page content enclosed between them.