Web platform features explorer

srcdoc

Widely available since 2022-07-15
Tags: api html

The srcdoc attribute for the <iframe> HTML element sets a string of HTML to embed in the document. The value of srcdoc overrides loading a document from the src attribute.

Specifications

Browser support (view on caniuse.com)

  • Chrome 20 Released on 2012-06-26
  • Chrome Android 25 Released on 2013-02-27
  • Edge 79 Released on 2020-01-15
  • Firefox 25 Released on 2013-10-29
  • Firefox for Android 25 Released on 2013-10-29
  • Safari 6 Released on 2012-07-25
  • Safari on iOS 6 Released on 2012-09-10