HTML Elements

HTML Elements

Table of content

HTML has various elements for different purposes. Each of them have a unique notation and they are defined by start tag, some content and close tag.

HTML Element normally consists of a start tag and end or close tag with some content inside them.

<tagname>Content will be here</tagname>

The above syntax combinedly known as HTML Element. For example:

<h1>Page Heading</h1>
<p>Page Paragraph</p>

The above tags are known as the conatiner tags, as they contains some content and have a ending tag.

Empty Tags

In HTML their are empty tags also. Empty tags are those tags which does not contain any content and no end tag. For example:

<br>
(This tag is used for line break in HTML)
<hr>
(This tag is used to create a horizontal line in HTML)

Nested HTML

In HTML elements can be nested(Elements within element). Every HTML document has nested HTML.

For example:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Page Heading</h1>
<p>Paragraph</p>
</body>
</html>
Try it

In the above example <html> defines the whole document with <html> as starting tag and </html> as ending tag and it contains <head> which further contains <title> element and <body> elements which further contains <h1> and <p> elements.

All the above stated elements have a starting tag and a closing tag.

You may also like
More Tutorials Free Web Tools Free Blogger Themes

Comments