# srcdoc

An iframe attribute containing the HTML document that should be embedded directly.

## What is **`srcdoc`**?

**`srcdoc`** — An iframe attribute containing the HTML document that should be embedded directly.

```html
<iframe title="Preview" srcdoc="<p>Order confirmed</p>"></iframe>
```

Level: Freelancer · [More HTML terms at this level](https://www.ask-codey.com/glossary/subjects/html/freelancer)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/srcdoc
