HTML Value Syntax

HTML url syntax

A URL identifies a resource or location. Relative references resolve against the relevant base URL; fragment references identify locations within a resource. Attribute-specific schemes and validity rules apply. Escape ampersands in markup when needed; never trust unvalidated user-provided URLs. This is a value grammar, not a standalone HTML element.

Formal Syntax & Structure

html syntaxhtml
href="/docs/page#intro"

Working Example

Example Snippethtml
<h2 id="intro">Introduction</h2><a href="#intro">Jump to introduction</a>
HTML Reference