THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Head Object


Head Object

The Head object represents an HTML <head> element.

Access a Head Object

You can access a <head> element by using getElementsByTagName():

var x = document.getElementsByTagName("HEAD")[0];

Create a Head Object

You can create a <head> element by using the document.createElement() method:

var x = document.createElement("HEAD");

Standard Properties and Events

The Head object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML Head

HTML reference: HTML <head> tag