Elements in HTML

Basic HTML Elements

What is an element in HTML?
The start tag, end tag and everything inside them, make an HTML element. The ‘everything inside’ is called the element content. In common use we often prefer saying the element instead of saying ‘the a element’.

This is very easy. Isn't it? Now see you are able to identify the elements correctly.

Identifying HTML Elements: An Exercise
Referring the example on previous page. Identify all the elements in this markup.
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>This is the output of my first HTML page!</h1>
</body>
</html>

Identifying HTML Elements: Answer

The elements of the above HTML code are

  • html. That's the whole <html> ..</html> make one html element.
  • head
  • title
  • body
  • h1

If you got it correctly, it should be very clear that all the elements of an HTML page are sub elements of the main element, the <html> element. We often call these sub elements as children of their parent element <html>.

The first element of every valid HTML code is the HTML element.