That's not necessarily "wrong", it's just not needed anymore. We used to have to include such comment tags so that browsers that don't understand script tags wouldn't output the code in the browser. Since virtually all browsers support the script tag, this is not needed anymore (same goes with CDATA for XHTML), but can still be visible in legacy code.
Is this a reply to my post? I'm not sure how does building your html programmatically relate to having HTML comments inside <script>. Could you explain what you mean?
why is that bad? is it because we can't guarantee those particular calls will synchronously execute, in relation to other possible calls going on in that page?
You want to avoid inline code as it is less maintainable – you want to have your code in one place, where it is expected to be, not attached to DOM elements in your markup, dotted all over the place.
Only comments and the end tag for the html element are allowed after the end tag for the body.
Browsers may perform error recovery, but you should never depend on that.
IE doesn't allow this anymore and will ignore such scripts. Firefox and Chrome still tolerate them, but there are chances that some day they will drop this as non-standard.
Regarding monospaced fonts. I recently switched (back) to Anonymous Pro but I am not loving it. In Sublime like 1 pixels worth is cut off of the left side of some characters.
I need something better. What is everyone else using?
42
u/[deleted] Mar 01 '16
Here's some problems I can see:
Java logo
Non-monospaced font
HTML comment inside
<script>Deprecated attributes on
<table>