<!DOCTYPE html> question

Hey I’ve got a small question regarding the element protocol. in the future the standard will become html 6 at which point is it possible an html 5 page may become problematically anachronistic with its declaration? cant I just throw a 5 in there? or is this unnecessary? /////////////////////////////////////////////////////////////////////

1 Like

Hello, and welcome to Codecademy!

You can just do <!DOCTYPE html> though I found that adding a five like this works:

I hope this helps =)

1 Like

That something works, doesn’t mean its good. Browsers are incredible error resistant, but you should still use the correct doctype deceleration and don’t trust the browser to handle something incorrectly correctly. For further versions of html, surely another deceleration will very likely be added.

1 Like

Future versions of HTML may well have a number suffix but the DOCTYPE will never change from the Living Standard, html. That tells the browser to use the newest implementation available.

Past versions of HTML may contain elements/attributes that have been deprecated or made obsolete in newer iterations, but the markup will still be valid if it at least conforms to HTML 4. One of the strictest recommendations has always been and will always be, backward compatibility. If the browser encounters something it does not recognize, it won’t render it, but the page will still render for the most part. The browser may attempt to polyfill if it has the wherewithal.