VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-embed-src-property/

⇱ HTML | DOM Embed src Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML | DOM Embed src Property

Last Updated : 5 May, 2025

The HTML DOM Embed src Property is used to set or return the value of the src attribute in an embed element. This attribute specifies the address of the external file to embed.

Syntax:

  • Return the src property:
    embedObject.src
  • Set the src property:
    embedObject.src = URL

Property Values:

  • URL: Specify the URL of the external file to embed.
    Possible Value:
    • Absolute URL: points to another web site
    • relative URL: points to a file within a web site.
  • Return Value: A String which is represent the URL of the embedded file. Returns the entire URL with the protocol.

Now let's understand this with the help of an example:


Output:

Supported Browsers:

  • Google Chrome 1 and above
  • Edge 12 and above
  • Internet Explorer 6 and above
  • Firefox 1 and above
  • Apple Safari 4 and above
  • Opera 12.1 and above
Comment
Article Tags: