The main
tag is used to hold all our major content in the web page.
As you can see, we have
included all our content inside the
main
tag inside the body
. This is
the use of the main
tag, simply
to hold all our important stuff.
Then, the question comes up: "Why don't we
simply keep all the content inside the
body tag?"
Well, because we want to organize everything
neatly!
Look at the example given below.
Here, our code becomes so easy to read.
Our navigation bar which stays at the top
of the website is in the header
and all
our major content in in the main
tag. Both of
these tags are inside the body
tag.