¡¡¡¡
HTML
- HTML 4.0 Strict: <!DOCTYPE HTML PUBLIC ¡°-//W3C//DTD HTML 4.0//EN¡± ¡°http://www.w3.org/TR/REC-html40/strict.dtd¡±>
- HTML 4.0 Transitional: <!DOCTYPE HTML PUBLIC ¡°-//W3C//DTD HTML 4.01 Transitional//EN¡± ¡°http://www.w3.org/TR/html4/loose.dtd¡±>
- HTML 4.0 Frameset: <!DOCTYPE HTML PUBLIC ¡°-//W3C//DTD HTML 4.01 Frameset//EN¡± ¡°http://www.w3.org/TR/html4/frameset.dtd¡±>
- HTML 3.2: <!DOCTYPE HTML PUBLIC ¡°-//W3C//DTD HTML 3.2 Final//EN¡±>
- HTML 2.0: <!DOCTYPE HTML PUBLIC ¡°-//IETF//DTD HTML//EN¡±>
- 1.0 Strict: <!DOCTYPE html PUBLIC ¡°-//W3C//DTD 1.0 Strict//EN¡± ¡°http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd¡±>
- 1.0 Transitional: <!DOCTYPE html PUBLIC ¡°-//W3C//DTD 1.0 Transitional//EN¡± ¡°http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd¡±>
- 1.0 Frameset: <!DOCTYPE html PUBLIC ¡°-//W3C//DTD 1.0 Frameset//EN¡± ¡°http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd¡±>
- 1.1: <!DOCTYPE html PUBLIC ¡°-//W3C//DTD 1.1//EN¡± ¡°http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd¡±>
˵Ã÷һϣ¬ 1¾ÍÊÇHTML 4.01µÄXML»¯£¬ÊÇÒ»ÖÖ²»ÏòÇ°¼æÈݵĸñʽ£¬Î´À´µÄ 2Ò²²»»áÏòºó¼æÈÝ¡£º¹¡¡ÕâÊÇÒ»¸öºÜ¿É±¯¹æ·¶¡£
ÄÇôӦ¸ÃÑ¡ÔñÄĸö£¿ÎÒÏàÐźܶàÈË£¬ÓÈÆäÊǽӴ¥ÁËÍøÒ³±ê×¼£¨Web Standards£©µÄÈË£¬»áºÁ²»ÓÌÔ¥µØÑ¡Ôñ 1.0 Transitional¡£ÕâÊÇÒ»¹ÉÇ÷ÊÆ£¬ÕâÊÇÒ»¹É³±Á÷£¬°µÊ¾×Å£¬ºÙºÙ£¬»ï¼Æ£¬¿´¼ûû£¬ÎÒÃǵÄÍøվʹÓÃ×îм¼Êõ¹¹½¨ÁË¡¡
ÕâÀïÓÐÒ»¸öºÜÓÐȤµÄͳ¼Æ£¬Ê¹Óà 1.0 StrictºÍTransitionalµÄÕ¼¾ø´ó¶àÊý£¬ÇҶ԰뿪¡£ÄÇô£¬Õâ¸öÊÀ½ç¾ÍÄÇôÃÀºÃÁËÂð£¿
ÎÒÃÇÏÈÀ´¿´¿´W3CµÄ½¨Ò飬×ܽá³öÏÂ±í£º
Ç°Ãæ˵µ½£¬ 1ʵ¼ÊÉÏÊÇHTML 4.01µÄXML»¯¡£¼´Ê±¿´ÆðÀ´£¬Ð´ÆðÀ´£¬ÓÃÆðÀ´¶¼ºÜÏñ£¬µ«ÕâÊÇÁ½ÖÖ²»Í¬µÄ¹æ·¶¡£µÄMIME-TYPEÓ¦¸ÃÊÇapplication/xhtml+xml
£¬¶øHTMLÓ¦¸ÃÊÇtext/html
¡£Á½ÕßÓкβ»Í¬£¬¼òµ¥µÄ˵£¬application/xhtml+xml
ÊôÓÚXML£¬ËùÒÔÐÐΪ×ñÑÒ»ÇÐXML¹æ·¶£¬×îÖØÒªµÄÊÇÁ¼¹¹£¨Well-Formed£©ÕâÒ»µã¡£
³ýÁË 1.0 TransitionalºÍFrameset£¬ÎÒÃÇ¿ÉÒÔ¿´µ½£¬ 1.0 StrictºÍ1.1¶¼SHOULDʹÓÃapplication/xhtml+xml
¡£È»¶ø£¬ÎÒÃÇ¿ÉÒÔ¿´µ½£¬Ç°ÃæÌáµ½µÄÄǸöͳ¼Æ£¬²¢Ã»ÓжàÉÙ¸öÍøվʹÓÃapplication/xhtml+xml
£¬¿ÉÒÔ˵ËûÃÇÊdz¶»¢Æ¤×ö´óÆì¶øÒÑ£¨Èç¹ûÄúÓÐÐIJ鿴һϱ¾blogµÄÔ´Â룬Äú»á·¢ÏÖÎÒÒ²ÊÇ£©£¬ËüÃÇ·ÇÁ¼¹¹µÄÄÚÈÝÒÀÈ»¿ÉÒÔͨ¹ýÖ§³Öapplication/xhtml+xml
µÄä¯ÀÀÆ÷£¨ÈçFirefox, Opera£©À´Õ¹ÏÖ£¬ÒòΪËüÃDZ¾ÖÊÉÏ»¹ÊÇtext/html
£¬¶øtext/html
²¢²»ÐèÒªÁ¼¹¹¡£
¿ÉÒÔ¿´µ½£¬ 1.0 TransitionalµÄµØλºÜêÓÃÁ£¬ËüµÄTransitional ʹµÃÆäMAY text/html
£¬SHOULD application/xhtml+xml
¡£Ò²¾ÍÊÇ˵£¬Ôõô´¦Àí£¬Êµ¼ÊÉϽ»ÓÉ¿Í»§¶Ë£¨client side£©À´¾ö¶¨¡£ÔÚÎÒËù¼ûµ½µÄ×ÀÃæä¯ÀÀÆ÷ÖУ¬ËüÃǶ¼ºÁ²»ÓÌÔ¥µØÑ¡Ôñtext/html
£¬Õâ¸úËüÃÇÒ»¹áµÄ¿íÈÝ·ç¸ñ±£³ÖÒ»Ö¡£
µ«ÊǺܲ»ÐÒµÄÊÇ£¬¾ÍÓÐÕâôһ¸öä¯ÀÀÆ÷£¬Opera for mobile£¬´Ó8.0¿ªÊ¼£¬·²ÊÇÉùÃ÷Á˵ÄDoctype£¬Ëü¶¼Ò»ÂÉÒÔapplication/xhtml+xml
À´´¦Àí¡£ËùÒÔ£¬ÄãÄDz»Á¼¹¹µÄÍøÕ¾£¬Ö»ºÃÔÚËüÉÏÃæÏÔʾ³ö´íÐÅÏ¢¡£
ËùÒÔ£¬ÍƼöʹÓà 1.0 Transitional£¬ÊǹÄÀøÄã´ÓHTMLÏòת»¯£¬ÇÒ±£³Ö¹ý¶ÉÐÔ¡£µ«¹ý¶ÉÐÔ²¢²»´ú±íÄã¾Í¿ÉÒÔ²»ÖØÊÓXMLµÄÁ¼¹¹¡£
ʵ¼ÊÉÏ£¬ÎÒÃDz¢Ã»ÓÐÄܹ»·¢ÏÖ 1.0 Transitional¸úHTML 4.01 StrictÓкβ»Í¬£¬³ýÁËÒ»¸ötarget
£¬Ò»Ð©¹ýʱµÄ±íÏÖ±êÇ©ºÍÊôÐÔ£¨attribute£©¡£Ö»ÒªÎÒÃÇÔÚHTMLÖв»Ð´×÷ÄÇЩÖв»´æÔڵıêÇ©ºÍÊôÐÔ£¬ÎÒÃÇʵ¼ÊÉϾÍÊÇÔÚд 1.0 Transitional£¬¶ÔÎÒÃDz¢Ã»ÓÐʲôӰÏ죬ʲôXMLµÄÓÅÔ½ÐÔÍêÈ«²»ÄÜÔÚ 1.0 TransitionalÖÐÌåÏÖ³öÀ´£¬ËùÒÔÓëÆäÈÃOpera for mobile£¨»òÐí»¹ÓÐÆäËû±äÊý£©²»Äܹ¤×÷£¬»¹²»ÈçÑ¡ÔñHTML 4.01 Strict¡£ÔÚÕâµãÉÏ£¬456BereaStreet.com×ö³öÁËÒ»¸öÊ®·Ö²»´íµÄÑ¡Ôñ¡£µ±È»£¬Èç¹ûÄúÄܱ£Ö¤ÄãµÄ 1.0 Transitional°Ù·Ö°ÙÁ¼¹¹£¬Ê¹ÓÃËüÊÇÒ»¸ö¸ü¼ÑµÄÑ¡Ôñ¡£È»ºó£¬ÇëÄã¸æËßÎÒ£¬ÊÀ½çÉÏ£¬Ê¹ÓÃÁË 1.0 TransitionalµÄÍøÕ¾£¬·ÇÊ×Ò³µÄÆäËûÒ³ÃæÄÜÓжàÉÙ¸öÊÇÄܹ»Í¨¹ýÑéÖ¤µÄ£¿
½áÂÛÊÇ£¬Èç¹ûÄãûÓÐÓÂÆø±£Ö¤Õû¸öÕ¾µã°Ù·Ö°ÙÁ¼¹¹£¬ÇëʹÓÃHTML 4.01 Strict£»Èç¹ûÄúÓÐÓÂÆø±£Ö¤Õû¸öÕ¾µã°Ù·Ö°ÙÁ¼¹¹£¬Äú¿ÉÒÔÖ±½ÓÑ¡Ôñ 1.1£¬ÏñÎÒËù×öµÄÄÇÑù¡£