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:
- How to add a background color to HTML elements.
- How to Open phone dialer in HTML.
- How to display hyperlinks without underline in HTML.