简体   繁体   中英

Sublime Text 2 not registering <!DOCTYPE html>?

I'm coding for a class, and whenever I run my code in internet explorer everything works perfectly. When I run it in chrome, it states I'm in quirks mode, and I read that to fix this I needed to add <!DOCTYPE html> .

For whatever reason, Sublime Text 2 skips over the statement, and still throws the error even though I added the tag. Any help? I'm an HTML newbie so any help is greatly appreciated!

(I added an image of the code, I know I can type it but this way you can see that the <!DOCTYPE html> isn't the color it needs to be)

在此处输入图片说明

Let me know if I need to edit and add more code for you to see :)

Quirks mode is the browser's attempt to handle backwards compatibility ie code meant for older browsers. Something in your code is probably deprecated or outdated. If Chrome is operating in quirks mode, it does not 100% mean that the root cause is a missing DOCTYPE. That's just one possible explanation.

You need to post the rest of your code for anyone to give you an answer. This has nothing to do with Sublime Text and everything to do with how Chrome is interpreting your code. On a side note, you should consider upgrading to Sublime Text 4 or 3 at the very least.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM