pls use search bar
Doctype is just to check the version of html.
Though it's not purely necessary.
You can do the code without doctype in code editor but I think in laptop's main code maker it will not work you have to put doctype any how there.
Hope this helps ✌️
Doctype just defines the document type i.e the specific document is HTML5....
Please UPVOTE if possible...❣️