1. Web
  2. Web APIs
  3. HTMLFormElement
  4. rel

HTMLFormElement: rel property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2023.

The rel property of the HTMLFormElement interface reflects the rel attribute. It is a string containing what kinds of links the HTML <form> element creates, as a space-separated list of enumerated values.

To retrieve the value as an array of tokens, use HTMLFormElement.relList.

Value

A string.

Examples

js
const form = document.querySelector("form");
console.log(form.rel);
form.rel = "noopener noreferrer";

Specifications

Specification
HTML
# dom-form-rel

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /