This is not an element or tag. it can not have content in itself. It lets the browser know how the document should be interpreted, by indicating what version or standard of HTML (or other markup language) is being used. Because of this, it is written before everything else while creating an html document. To understand it, we will break it into points.
- ! -> It tells the browser that it is either a comment() or this is an html document.
- DOCTYPE -> Documentation Type
- html -> version of HTML. Here it means HTML5.
- < ... > -> this is the way we write everything in an html document.
- < html > -> This tag signals that from here on we are going to write in HTML code.
- < head > -> This is where all the metadata for the page goes — stuff mostly meant for search engines and other computer programs.
- < body > -> This is where the content of the page goes.