0

I started working on a project and forgot to mention the DOCTYPE at the beginning and just used <html>. I feel really stupid about doing it, right now. The webpage heavily realizes on javascript and I have a lot of instances of the document height and scrollTop. Now I just realized that and added a Doctype. This messed up the whole page. I tried transitional and strict, but all the doctypes have the same effect. My question is if the default doctype is always<!DOCTYPE html>? I read online that if no doctype is specified it always resorts to <!DOCTYPE html>. I tried changing it to that, but it still messes up the website. So could

user61941
  • 27
  • 1
  • 5

1 Answers1

1

This is probably because you are using elements that are associated with a specific DOCTYPE. <!DOCTYPE html> defaults to html5. If no DOCTYPE is specified, you webpage defaults to quirks mode. Since you set everything up according to this standard, it isn't compatible with a standard mode.

Liam Lundy
  • 63
  • 6
  • Thanks I realized that if I used transitional without a identifier it should use quirks instead of standard. – user61941 May 22 '15 at 02:35