Skip to main content

HTML Elements

An HTML element is a type of HTML (Hypertext Markup Language) component, one of many type of HTML nodes .HTML is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.

Structure elements

<html>...</html>

The root element of an HTML document; all other elements are contained in this.

<head>...</html>

Container for processing information and metadata for an HTML document.

<body>...</body>

Container for the displayable content of an HTML document.

Head elements

<link />

Specifies links to other documents, Such as  external css and javascript.

<meta />

Can be used to describe extra metadata about a HTML document, such as its page title, page description, keywords, or other information not provided through the other header elements and HTML attributes. 

<object>...</object>

Used for including generic objects within the document header.

<script>...<script>

Can work as a container for script instructions or link to an external script with the optional src attribute.

<style>...</style>

Specifies a style for the HTML document.

<title>...</title>

This tag defines a document title.

Body elements

viewable elements can be contributed as either block or inline.

Block Elements

Basic text

<p>...</p>

Creates a paragraph, possibly the most common block level element.

<h1>...</h1> <h2>...</h2> <h3>...</h3> <h4>...</h4> <h5>...</h5> <h6>...</h6>

Section headings are at distinct levels. h1 determines the highest-level heading and h6 determines the lowest-level heading.

Lists

<dl>...</dl>

A description list which contains of name–value groups.

<dt>...</dt>

A name in a description list (early definition term in a definition list).

<dd>...</dd>

A value in a description list (early annotation data in a definition list).

<ol>...</ol>

An ordered (summarised) list.

<ul>...</ul>

An unordered (bulleted) list.

<li>...</li>

A list item in ordered (ol) or unordered (ul) lists.