On 04/25/2010 04:44 PM, Eric Brine wrote:
On Sun, Apr 25, 2010 at 2:42 PM, Mark Mielke <m...@mark.mielke.cc
<mailto:m...@mark.mielke.cc>> wrote:
Closing tags gives the processor more explicit instructions on how
to deal with ambiguities
There are no ambiguities in valid HTML.
There are no ambiguities in any language, but we still use () to help
the people who are trying to read it, and if it is *not* valid HTML,
having the explicit instructions certainly makes it easier to debug...
The combined open close tags such as <hr/> should be used with a
space before the / to make sure it works on old and new browsers.
Try: <hr />
That's not valid HTML.
What is invalid about it? The "/" gets interpretted as an unrecognized
attribute. Do you mean formal HTML without support for extensions via
new attributes? Which HTML or XHTML parsers do you know that will break
with <hr />?
Again, it's just a good practice.
No, using invalid HTML is not good practice. There's no reason to do
it, and the only possibly effect is to create errors.
If you're writing HTML, write HTML.
If you're writing XHTML, write XHTML.
This is a matter of interpretation. I don't see any problem with writing
code that is both valid XHTML and valid HTML. But if you don't, I won't
try to further convince you...
Cheers,
mark