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

NameTypeDescription
relspace-separated relationship tokensInclude expect on an element that supports this relationship.
hrefURL or fragmentIdentifies the linked destination or resource.
blockingspace-separated tokensUse 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>
HTML Reference