Is this a valid code <!doctype html lang="en"> ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is this a valid code <!doctype html lang="en"> ?

Is this a valid code? <!doctype html lang="en"> </html> And why? What's the explanation?

17th Aug 2019, 3:04 AM
Adi Pratama
Adi Pratama - avatar
1 Answer
+ 4
No because <!DOCTYPE html> is not the opening tag. This would be the correct way: <!DOCTYPE html> <html lang="en"> </html>
17th Aug 2019, 3:34 AM
Paul Grasser
Paul Grasser - avatar