+ 2

Starting your html code with <!DOCTYPE html> is wrong. Is this true?

Just finished the html tutorial on SL and I decided to do a practice video. But in the video it says its wrong to start your html code like this. Is this true? And if yes, please whats the right way to start you html code? Thanks for the help.

19th Mar 2020, 4:39 PM
mlq002
mlq002 - avatar
4 Antworten
+ 2
mlq002 Yes, XHTML uses different DTD than that of HTML 4 or HTML 5. The link in Martin Taylor's answer got the samples for various DTDs.
20th Mar 2020, 2:54 AM
Ipang
+ 1
In the video, since they said it was wrong, did they show the right way? Which HTML version is covered in the video? need to confirm that because DTD differs between HTML 4 and HTML 5.
19th Mar 2020, 4:52 PM
Ipang
+ 1
@Ipang the video covered xhtml. To be honest i dont really know the differene btw xhtml and html
19th Mar 2020, 7:43 PM
mlq002
mlq002 - avatar
+ 1
Martin Taylor thanks for the response and the links? @Ipang thanks for the response. Helped clear things up!
23rd Mar 2020, 10:52 AM
mlq002
mlq002 - avatar