How does a web browser distinguish between HTML5 and HTML4?

How does a web browser distinguish between HTML5 and HTML4?

+4
source share
1 answer

According to w3schools , the following DOCTYPE defines the document as HTML5:

<!DOCTYPE html>

And the three types of HTML4 are defined by the following DOCTYPE declarations:

HTML 4.01 Strict

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

HTML 4.01 Transitional

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

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">  
+3
source

All Articles