Do you use DOCTYPE without any reference?

Last updated by Tiago Araújo [SSW] almost 2 years ago.See history

Since HTML5, DOCTYPE no longer requires a reference to a DTD. Back in HTML 4.01, The DTD links were used in to specify the rules for the markup language (Transitional, Strict, Frameset etc) so that the browsers render the content correctly. It's no longer necessary.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "https://www.w3.org/TR/html4/strict.dtd">  

Figure: Bad example – Old reference in DOCTYPE

<!DOCTYPE html>

Figure: Good example – HTML 5 DOCTYPE declaration

For more information, see HTML !DOCTYPE Declaration on w3schools.com.

We open source. Powered by GitHub