It works perfectly fine when you add the <body> tag.

Your code would look something like (excluding scripts, and style):

<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
    <svg width="960" height="600"></svg>
    <script type='text/javascript' src='script.js'></script>

Make sure have the script.js file in the right directory. Else copy the code into a <script> </script>tag. I cannot recommend this though.

Related Query

More Query from same tag