-
What's the difference?
Most sites simply say "Use this when you want really clean structural mark-up, free of any tags associated with layout".
I get this error on the w3c validator:
Error: document type does not allow element "img" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag
Must I put a <img> in a <p> to conform to strict standards?
-
Strictly speaking (pardon the stupid pun), yes.
If you're using the strict DTD then you must use <p> </p> blocks (or one of the tags pointed out by the validator) for pretty much all of the code inside your <body> </body> (that is, you need to break everything down on your site into one of those tags as pointed out by the validator). If you use the transitional DTD however the validator is more relaxed about the placement of certain tags (as it accomodates errors more easily and is slightly more compatible with older browsers).
Personally speaking I use the transitional DTD to avoid any trouble. After all I place design, usability and functional aspects above code cleanliness.
-
I use the transistional DTD too and for the most part I ahve found that most speech browsers can cope with it. It is when you do really stupid things like leave out ALT tags that they get confused!