Newb here baffled as to why this doesn't work:

Code:
<!DOCTYPE html>

<html>
<head>
    <title>Page Title</title>
    <script type = "text/javascript">
        var foo = document.getElementById("foo");
        foo.innerHTML = "Stuff added by Javascript.";
    </script>
</head>

<body>

    <div id="foo"></div>

</body>
</html>