HTML <a>ターゲット属性
例
target属性は、リンクされたドキュメントを開く場所を指定します。
<a href="https://www.w3schools.com" target="_blank">Visit W3Schools</a>
定義と使用法
このtarget
属性は、リンクされたドキュメントを開く場所を指定します。
ブラウザのサポート
Attribute | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
構文
<a target="_blank|_self|_parent|_top|framename">
属性値
Value | Description |
---|---|
_blank | Opens the linked document in a new window or tab |
_self | Opens the linked document in the same frame as it was clicked (this is default) |
_parent | Opens the linked document in the parent frame |
_top | Opens the linked document in the full body of the window |
framename | Opens the linked document in the named iframe |
❮HTML<a>タグ