Get the id of the <head> element of the current document:
The result of x will be:
The head property returns the <head> element of the current document.
Note: If there are more than one <head> element in the document, this property returns the first one.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
head | 4.0 | 9.0 | 4.0 | 5.0 | 11.0 |
Return Value: | A reference to the Head Object, which represents a <head> element |
---|---|
DOM Version | Core Level 3 Document Object |
HTML reference: HTML <head> tag
JavaScript reference: HTML DOM Head Object