On Jul 10, 10:09 pm, Jack Stewart <[email protected]> wrote:
> The problem is that when I use the <DocType HTML>, BBEdit shows
> 232 syntax errors on the index page alone. If I use 4.01
> transitional it only shows about 20 errors.

The number of errors is a separate--although related--issue from what
doctype is best in this modern day and, very likely, going forward for
the next several years. If the explanation on at the link I provided
earlier is not clear in regards to doctype, then ask questions to
clarify it so you understand the implications.

All that said, the reason you have more errors using the HTML5 doctype
is because it triggers "standards mode" which does not tolerate non-
standard HTML. I assume the doctype you provided likely triggers
"quirks mode" which is tolerant of sloppy, non-standard HTML. As a
result more errors will be reported in standards mode.

The best practice is to fix the HTML to conform to whatever doctype
and mode you choose, so that fewer unexpected rendering and display
issues arise. But don't take my word for it. This piece of advice
comes straight out of the BBEdit manual:

Note that an HTML document can display the way you expect it to in a
browser and still contain invalid HTML. Browsers are designed to be
lenient in the markup they accept, so you can get away with a certain
amount of "sloppy" markup. However, producing well-formed
(syntactically correct) HTML documents is the best way to assure that
your document will display in some reasonable fashion in a wide
variety of Web browsers, even those you have not tested the page in.

I don't know which tool BBEdit uses to validate HTML syntax, but the
W3 provides one useful tool, and there are syntax checkers that come
with web development plugins for Firefox and Chrome.
http://validator.w3.org/
http://chrispederick.com/work/web-developer/

--steve

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to