Loading script outside of html document

Viewed 8358

I came accross this html snippet & to my surprise jQuery Object does get created!

<!doctype html>
<body>
<h1>Hello World</h1>
</body>
</html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>

As you may notice <script> tag comes AFTER closing </html> tag. I wonder how & why does this even work?

3 Answers
Related