HTML Page Structure

HTML Elements
HTML Attributes

HTML Elements

HTML is all about elements. In HTML, element is more abstract form of a tag in the hierarchical structure of an HTML document which consists of a start tag, content, and an end tag. HTML element encompasses attributes, other child elements and content such as text.


<p>Adding content of paragraph element.</p>

There are many elements in HTML such as <p>..</p> <div>..</div> and many more. But there are some HTML elements which is not require to close such as <br/>,<hr/> etc.



HTML Elements List

The below table contains some elements and their description which is supported by HTML version.

Attribute NameAttribute Description

Difference Between Elements and Tags

Tags are labels that you generaly use to mark up the begining and end of an element. All tags have the same format they start with a "<" sign and end with a ">" sign.

For Example


Whereas elements are something that consists of start tag and end tag.

<h1>Page Heading</h1>

Elements can encompass attributes, child elements and other contents such as text.

<code><div>This is a div element</div></code>

HTML Elements

<!DOCTYPE html>
<title>My HTML Element code</title>
This is paragraph element inside div element