Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

SVG Document.head Property

  • Last Updated : 30 Mar, 2022

The SVG Document.head property returns an object which contains the information about the head of the document.

Syntax:

var objRef = document.head

Return value: This property returns an object which contains the information about the head of the document.

Example 1: 

HTML




<!DOCTYPE html> 
<html
<head>
    <title>Title</title>
</head>
<body
    <svg width="350" height="500" 
        xmlns="http://www.w3.org/2000/svg">
  
        <script>
            console.log(document.head)
        </script>
    </svg>
</body
  
</html>

Output:

Example 2: 

HTML




<!DOCTYPE html> 
<html
<head>
    <title>GeeksforGeeks</title>
</head>
<body
    <svg width="350" height="500" 
        xmlns="http://www.w3.org/2000/svg">
  
        <script>
            console.log(document.head)
        </script>
    </svg>
</body
  
</html>

Output:


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!