oretc. in XHTML 1.0 St...">

Do modern browsers support DOCTYPE?

If you use obsolete attributes or tags <center>, <font color="red">or <td valign="top">etc. in XHTML 1.0 Strict (without des attributes), modern browsers (I will use Chrome as an example) still notice and use them.

If you use HTML5 <video>on the XHTML 1.0 Strict DOCTYPE, Chrome will still recognize it - it's not like they programmed it to nothing. I tested the worst obsolete, uppercase and incorrect attribute code that I could write with HTML5 audio using XHTML 1.0 Strict DOCTYPE in Chrome, and it looked flawless.

Here the code I tested works flawlessly in Chrome (red bg, centered, audio playback):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Do browsers care about the DOCTYPE?</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
</head>
<body bgcolor=#ff0000>
 <CENTER>
  <table cellpadding="0" cellspacing=0>
   <tr><td valign=top>test</td></tr>
  </table>
 </CENTER>
 and some HTML5 audio..
 <audio autoplay>
  <source src="http://www.duncannz.com/resources/sound/alarm.mp3" type="audio/mp3">fallback text</audio>
</body>
</html>


, : (: , IE) - - - DOCTYPE? ?

+5
5

DOCTYPE - !

, , / , . , . - , , , . HTML4 5, , - Firefox IE!

DOCTYPE , "quirks" ( ) " ". - W3C, , - HTML, , -, DOCTYPE, . , XHTML strict .

, !

+8

( ) Doctypes. , , , CSS, / . Doctype . , Doctype, , , Quirks .. IE, , .

: http://hsivonen.iki.fi/doctype/

+2

Chrome:

<!DOCTYPE html>
<title>Test case</title>
<p hidden>My text
<table><tr><td>Hello World</table>

<title>Test case</title>
<p hidden>My text
<table><tr><td>Hello World</table>

"Hello World".

+2
0

All Articles