HTML | srcdoc Attribute Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share 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 Id 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 | 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 Id Attribute HTML id attribute provides a unique identifier for an element within a document. It allows targeted selection and manipulation of the element through CSS and JavaScript, facilitating specific styling and functionality. In CSS, the id attribute is used using the # symbol followed by id. quotes are no 5 min read HTML nonce Attribute The HTML nonce attribute is a global content attribute that defines a cryptographic nonce(" number used once "). It is used by Content Security Policy(it is an additional layer of security that helps to detect and mitigate certain types of attacks like data injection attacks) to check whether a give 3 min read HTML | rel attribute The rel attribute is used to specify the relationship between the current and the linked document. It is used only when href attribute present.Supported tags: The rel attribute is applied to the following elements:a: relarea: rellink: relform: relExample of HTML a rel Attribute  index.html<!DOCTY 1 min read Like