Plain HTML
It won't be ignored. It will be added to the DOM as an unknown element. (spec).
JavaScript
JavaScript is not HTML. It will be parsed as if it was JavaScript. Since it isn't valid, it will throw an exception.
HTML Script tags
Since it is after a <script>
tag, before a </script>
tag and is a "tag" that isn't </script>
: the HTML parser does not treat it as a tag and passes it through to the JavaScript engine. (spec)
Since it is not valid JS, the JS engine will throw an exception.