Quote Originally Posted by Kovo88
accomplishes the same thing no?
As I stated...not as it's written it won't.

The command is getElementsByTagName(). Notice that it is plural. It returns an array of all tags that match your specification.

Code:
var headtag = document.getElementsByTagName('head').item(0);