I know there are different doctypes for html and xhtml as well as between strict, transitional, etc. but will someone encounter errors if using transitional html but declaring the doctype as xhtml transitional? Is this a bad habit to develop, or is it completely flexible? Are there some errors that could happen that I am not seeing, or could it affect things such as CSS negatively? I’ve been working with precoded pages and packages lately and connecting them and some use html 4.01 transitional, some use xhtml 1.0 transitional and I’m curious what, if any, conflicts I could have later down the line. Thanks!
Share
Browsers don’t care what the Doctype is beyond it being a Magic String that triggers Standards Mode, Almost Standards Mode or Quirks mode.
You should use the correct Doctype so that you can use a validator as a useful QA tool instead of one that throws up lots of errors because you write XHTML with an HTML Doctype.