HTMLAnchorElement: rel プロパティ - Web API | MDN

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

HTMLAnchorElement.rel プロパティは rel 属性を反映しています。これは、空白で区切られたリンク種別のリストの入った文字列であり、<a> 要素で表されるリソースと現在の文書との関係を示します。

文字列です。

js

const anchors = document.getElementsByTagName("a");
for (const anchor of anchors) {
  alert(`Rel: ${anchor.rel}`);
}

仕様書

Specification
HTML
# dom-a-rel

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.