Javascript Ajax jQuery HTML PHP Example MORE
Need a Website Or Web Application Or Any Help.Contact Us: +91 9437911966 (Whatsapp) Note: Paid Service

HTML Element with example

An HTML Consists of a “Start Tag”, “Element content” and “End Tag”.

Syntax:

<p>My Name is John<p>

Here<p>is start tag. My Name is John is the element content. <p> is the end tag.

Example

<!DOCTYPE html>
<html>
<body>
 
<p>My Name is John</p>
 
 
</body>
</html>

Run it yourself

Empty HTML Elements

The Element which have no content is called as empty element.

<br> is an empty element without a closing tag (the <br> tag used to defines a line break in HTML).

<!DOCTYPE html>
<html>
<body>
<p>My Name is John</p>
<br>
<p>He is a good boy. </p>
</body>
</html>

Run it yourself

Nested HTML element

In some cases that an HTML element can contain one or more element.

Let’s see the below example for the better understanding.

<html>
<body>
 
<p><strong>This is a paragraph</strong></p>
 
</body>
</html>


Run it yourself

HTML Is Not Case Sensitive

HTML is not case sensitive. If you write

instead of

it gives the same output.Let’s see an example for better understanding.

<!DOCTYPE html>
<html>
<body>
 
<p>My Name is John</p>
<P>My Name is John</P>
 
 
 
</body>
</html>

	

Run it yourself