Ah, ok. What is (very probably) happening that is you are including your JS file at the top of your document and it is trying to reference elements on the page before they exist.
Try moving it to the bottom of your page, like this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
... Your Content ...
Also, in the code you posted, the <title> element should come within the <head> element.