CSS Menu / Posts /

DOCTYPE is necessary for IE

41
I stage a testing page online and found it doesn't work in IE 8. The code is:

<html>
    <head><title>test</title></head>
    <body>
        (the css menu)
    </body>
</html>

Can anybody tell me why?

Fanny  5 years ago   viewed: 10889    

2 Answers

5
Because your markup is missing the DOCTYPE declaration. IE 8 and earlier has insufficient and erratic support if that declaration is missing.

So, Give always a DOCTYPE to your document:
<!DOCTYPE html>
<html>

or:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

But not:
<html>

and not the very old DOCTYPE standard:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>


Milo   5 years ago
0
Hello everyone !!!!  tank's a lot for the help, this page is so helpful and awesome!!
Raul Paz
  3 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question:
    • If your question is related to the CSS Menu, click:

      Ask new question: CSS Menu
    • Otherwise navigate to one of the following forum categories, and post your question there.

      ##