Is it compulsory to start with <!DOCTYPE> | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite

Is it compulsory to start with <!DOCTYPE>

4th Sep 2018, 9:49 AM
2 Réponses
+ 2
No, it's not, but it's best practice to do so for various reasons (like ensuring the browser reads the page in a predictable manner, search engine optimization, etc.) On a different note... There are already similar (if not identical) questions posted. You can find the answers using the search bar. Please help keep the quality of posts high in this section of the forum by reviewing the following: Be sure not to miss the link to the Community Guidelines toward the bottom of the article. Happy coding! P.S. Please see the following post for a humorous interpretation (but still an earnest plea).
4th Sep 2018, 10:03 AM
Janning‚≠ź - avatar
Its not compulsary. But if you want to use Html5 features , you have to write it in your document. Writting it ,it tells the browser that your website is using latest html5 so it renders your website accordingly. Also if this helps‚ėļÔłŹ‚ėļÔłŹ
4th Sep 2018, 10:03 AM
Meet Mehta
Meet Mehta - avatar