What should be the first tag in any HTML document?

You are a complete beginner to HTML and you are looking answer for the question What should be the first tag in any HTML document? today I will provide you a answer to your question so follow up with me till the end.

We will not waste much time but if you have seen the HTML boilerplate code which is there in all HTML documents if you have not below is the the basic HTML boilerplate code which exists in all HTML pages.

As you can see in the above HTML code <!DOCTYPE html> is the first line does that means that it is the first tag in a HTML document the answer is no because <!DOCTYPE html> is not a HTML tag it is just a declaration which instructs the browser which HTML version is the page written in.

So now the second tag is <html> which is a HTML tag and all the HTML code is written inside this tag so the first tag in any HTML document should be <html> and also the end tag of any HTML document should be </html>.

I hope you found this guide helpful and you found your answer to your question which is what should be the first HTML tag which is <html> as I have said.

Here are more guides which you may find helpful:

Want more solutions and guides like this then join our coding community on Telegram to get latest blog updates and more – Join Telegram channel.
Spread the love

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *