Html-a-tag

提供:Dev Guides
移動先:案内検索

HTML-<a>タグ

説明

HTML <a>タグは、別のドキュメントまたは現在のドキュメント内のどこかにハイパーリンクを作成するために使用されます。

<!DOCTYPE html>
<html>

   <head>
      <title>HTML a Tag</title>
   </head>

   <body>
      <p>This is a link to <a href = "http://www.amrood.com">AMROOD.com</a></p>
   </body>

</html>

これは、次の結果を生成します-

グローバル属性

このタグは、リンク:/html/html_attributes_reference [HTML属性リファレンス]で説明されているすべてのグローバル属性をサポートします

特定の属性

HTML <a>タグは、次の追加属性もサポートしています-

Attribute Value Description
charset character_encoding Defines the character encoding of the linked document.
coords

if shape = "rect" then coords = "left, top, right, bottom"

shape = "circ"の場合、coords = "centerx、centery、radius"

shape = "poly"の場合、coords = "x1、y1、x2、y2、..、xn、yn"

Specifies the coordinates appropriate to the shape attribute to define a region of an image for image maps.
download html-5 filename This downloads the target when user clicks on the hyperlink.
href URL Specifies the URL of a page or the name of the anchor that the link goes to.
hreflang language_code Language code of the destination URL.
media html-5 media_query It specifies what media the linked document is optimized for
name section name Marks an area of the page that a link jumps to.
rel alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark Describes the relationship between the current document and the destination URI.
rev alternate designates stylesheet start next prev contents index glossary copyright chapter section subsection appendix help bookmark Specifies the relationship between the target URL and the current document.
shape rect rectangle circ circle poly polygon Specifies the shape of the image map
target _blank _parent _self _top

Where to open the target URL.

_blank-ターゲットURLは新しいウィンドウで開きます。

_self-ターゲットURLは、クリックされたときと同じフレームで開きます。

_parent-ターゲットURLは親フレームセットで開きます。

_top-ターゲットURLはウィンドウ全体で開きます。

type html-5 mime_type Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL

イベント属性

このタグは、link:/html/html_events_reference [HTMLイベントリファレンス]で説明されているすべてのイベント属性をサポートしています。

ブラウザのサポート

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes