The HTML element is starting with HTML opening tag, contents and ending with a closing tag. For example,
At here, the
<p> is an opening tag of HTML element. The
Hello World! Text is the content of that HTML element and we end the HTML tag with
</p> closing tag.
To be clear, let me show you how the HTML element look like with an image.
From the image above, you can see the HTML element created with opening tag, content and closing tag. In opening tag, if you can also add the html attributes too.
There are some exception cases like
<hr> etc… These tags need not end with a closing tag. Just left it without ending tag. Don’t feel weird because they are exceptions tags.