Open In App

HTML | DOM Quote cite Property

The HTML DOM Quote cite Property is used to set or return the cite attribute of a quotation. The cite attribute specifies the source URL of a quotation.

Syntax:



Property Values: It contains single value URL which is used to specify the URL of the quotation. The possible value of the URL are:

Return Value: It returns string value which representing the URL of the source document.



Example 1:




<!DOCTYPE html> 
<html
    <head
        <title
            HTML DOM Quote cite Property 
        </title
    </head
      
    <body
        <h1>GeeksforGeeks</h1
          
        <h2>DOM Quote cite Property</h2
          
        <q id = "GFG" cite = "geeksforgeeks.org"
            GeeksforGeeks 
        </q
        <br><br
  
        <button onclick = "Geeks()"
            Submit 
        </button
          
        <p id = "sudo"></p
          
        <script
            function Geeks() { 
                var ct = document.getElementById("GFG").cite; 
                document.getElementById("sudo").innerHTML = ct; 
            
        </script
    </body
</html>                             

Output:

Example 2:




<!DOCTYPE html> 
<html
    <head
        <title
            HTML DOM Quote cite Property 
        </title
    </head
      
    <body
        <h1>GeeksforGeeks</h1
          
        <h2>DOM Quote cite Property</h2
          
        <q id = "GFG" cite = "Finecomb.com"
            GeeksforGeeks 
        </q
        <br><br
  
        <button onclick = "Geeks()"
            Submit 
        </button
          
        <p id = "sudo"></p
          
        <script
            function Geeks() { 
                var ct = document.getElementById("GFG").cite
                         = "www.geeksforgeeks.org"; 
  
                document.getElementById("sudo").innerHTML
                     = "The cite was changed to " + ct; 
            
        </script
    </body
</html>                             

Output:

Supported Browsers: The browsers supported by HTML DOM Quote cite Property are listed below:


Article Tags :