Web Tools Table Maker3schools TranslateImage CompressorFavicon Icon GeneratorCrop & Resize Image
Apu
Apu February 04, 2023 › #Html Tutorials #LEARN HTML

HTML Elements

HTML Elements


 Prior to this, I discussed the HTML tag. A start tag (such as <p>) and end tag (such as </p>) is an element with what is in between. 

Example

<p>This is a P Element</p>

This is a p element


HTML Documents are made up by HTML Elements.


See the example below :


Example

<!DOCTYPE html>
 <html>
  <body>
   <h1>This is the most important heading</h1>
   <h2>This is h2 element</h2>
   <p>This is p element</p>
  </body>
 </html>

It is an HTML element with all that is inside <HTML> </ HTML> . Similarly, it is a body element with all that is inside <body> </body>.


Elements may also contain inside the element (It is called nested element).


This example contains 5 HTML elements :


1> HTML Element
2> BODY Element
3> h1 Element
4> h2 Element
5> p Element


save
listen
AI Answer
Write Your Answer
loading
back
View All