> Firefox requires the semicolons after the statements. IE lets you cheat.
Bosh. Ecmascript doesn't require you to have semicolons at the end of statements. Automatic semicolon insertion takes place during the parsing phase. There are no browser exceptions to this rule.
Then why do I get errors if I accidentally leave one out?
> And you have not &-coded your < and > characters inside the script.
Bosh. If you do so, they would no longer be comparison operators.
This is required for XHTML. He didn't specify a Doctype.
By the time the JS interpreter gets it, the &-codes are supposed to already be converted. But if the script is not embedded in the html, the &-codes must not be used.
Except for short calling scripts, it is always much better to have a separate JS file.
> The browser thinks they are an HTML tag.
That depends on the DOCTYPE and is only true for XHTML documents.
That's all I use for new pages now. Everyone should be doing this, to ensure future compatibility.
Maybe XHTML Doctypes require the semicolons too.