Link Relationships
HTML rel="expect"
Can delay initial rendering until a specified document element has been parsed. The target is a same-document fragment; use sparingly and check support. It does not wait for arbitrary asynchronous JavaScript. The example belongs in a document head; resource URLs are illustrative. Supply actual resources and server configuration to observe network behavior.
Formal Syntax & Structure
html syntaxhtml
<link rel="expect" href="#main" blocking="render">Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| rel | space-separated relationship tokens | Include expect on an element that supports this relationship. |
| href | URL or fragment | Identifies the linked destination or resource. |
| blocking | space-separated tokens | Use render to request blocking rendering until the target is parsed. |
Working Example
Example Snippethtml
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>Example</title> <link rel="expect" href="#main" blocking="render"> </head> <body> <main id="main">Essential content</main> </body></html>