Elements of HTML
What are elements of html?
As discussed earlier, elements of html are the commands used in html. These commands are known as tags along with their attributes. Attributes are the commands which control the behaviour of the tags. This was a quick revision.
There are two types of elements in html. They are:-
1. Paired elements
2. Unpaired elements
HTML is a markup language. I consider, writing a webpage is done in certain boundaries (atleast for me). These boundaries are itself, the html tags. I said this because, suppose i have to write in an html that 'football is the best game', then i'll write <tag> football is the best game </tag>. Here, <tag> is an opening tag and </tag> is a closing tag and, i would say that these were the boundaries i was trying to explain.
In above example, <tag> is an opening tag and </tag> is a closing tag. These are paired tags. Paired tags are those which require both closing tag and opening tag while unpaired tag are those which does not require any closing tag. Paired elements are also known as container elements as these contain html data. Only one tag is written for unpaired tag because there is no such thing as closing tag for unpaired tag. Unpaired tags are also known as empty elements or empty element.
Note: <tag> is not an actual tag used in writing webpages, but instead, html tags are written in this format (inside < and >) and / is used for only closing elements. Attribute of an html tag is written along with its tag for e.g.: <tag attribute="value or text">.