Skip to content
Related Articles

Related Articles

Improve Article

SVG Document.doctype Property

  • Last Updated : 05 Nov, 2020
Geek Week

The SVG Document.doctype property returns the doctype of the document.

Syntax:

doctype = document.doctype

Return value: This property returns the doctype of the document.

Example:

HTML




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

Output:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :