HTML Element

HTML Element Syntax

HTML elements follow a certain format. An HTML element starts with a start tag and ends with an end tag. The element content is between the start tag and the end tag.

The following shows a paragraph tag p.


<p>This is a paragraph.</p> 

Empty HTML tags

HTML elements can have empty content. HTML tags without content are called empty elements. Empty elements can be closed within the start tag. For example,


<p></p> 

Empty elements can be closed in the start tag as follows.


<p/>

Nested Elements

Most HTML elements can be nested. Nesting is to contain other HTML elements.


<html> 
<body> 
</body> 
</html>

In the html document above <html> tag contains <body> tag. And we can say body tag is nested inside html tag.

Lowercase Tags

HTML tags are not case sensitive. <P> means the same as <p>.