HTML | srcdoc Attribute Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The HTML srcdoc attribute is used to specify the HTML content of the page to show in the inline frame. This attribute is anticipated to be used beside the sandbox and seamless attributes. If a browser supports the srcdoc attribute, it'll override the content laid out in the src attribute (if present). If a browser doesn't support the srcdoc attribute, it'll show the file laid out in the src attribute instead (if present). Supported tag: iframe Attribute Values HTML_code: It is used to specify the HTML content of the page which will display in an Iframe element. Example: html highlight=7 Output: Supported Browsers: The browsers supported by HTML srcdoc Attribute are listed below: Google Chrome 20.0 and aboveEdge 79.0 and aboveFirefox 25.0 and aboveInternet Explorer not supportedOpera 15.0 and aboveSafari 6.0 and above Comment More infoAdvertise with us Next Article HTML | scoped Attribute V Vijay Sirra Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Similar Reads HTML src attribute The HTML src attribute specifies the URL or file path of an external resource, such as an image, video, audio file, or script, to be embedded or referenced within a webpage. Syntax: <element src="url">HTML src attribute Supported tagsTagDescription<audio>Embeds sound content for playback 2 min read HTML src attribute The HTML src attribute specifies the URL or file path of an external resource, such as an image, video, audio file, or script, to be embedded or referenced within a webpage. Syntax: <element src="url">HTML src attribute Supported tagsTagDescription<audio>Embeds sound content for playback 2 min read HTML | scoped Attribute The HTML scoped attribute is a boolean attribute that is used to specify that the styles only apply to this element's parent element and that element's child elements (not the entire document).Note : It is a deprecated attribute and it is not supported by HTML5. Supported tag: style Example: html 1 min read HTML | scoped Attribute The HTML scoped attribute is a boolean attribute that is used to specify that the styles only apply to this element's parent element and that element's child elements (not the entire document).Note : It is a deprecated attribute and it is not supported by HTML5. Supported tag: style Example: html 1 min read HTML srclang Attribute The srclang attribute is used to specify the language of the track text. The srclang attribute can be applied on the <track> element:Note: srclang attribute is required with kind = âsubtitlesâ.Syntax<track src="subtitles_en.vtt" kind="subtitles" srclang="en">Example: Below is an example 2 min read HTML srclang Attribute The srclang attribute is used to specify the language of the track text. The srclang attribute can be applied on the <track> element:Note: srclang attribute is required with kind = âsubtitlesâ.Syntax<track src="subtitles_en.vtt" kind="subtitles" srclang="en">Example: Below is an example 2 min read Like