Home » ★HTMLタグリファレンス

★HTMLタグリファレンス

<A> …… リンクをはる、リンクの出発点・到達点を指定する
Internet Explorer4Internet Explorer5Internet Explorer5-macInternet Explorer5.5Internet Explorer6Internet Explorer7Internet Explorer8Internet Explorer9
Netscape4Netscape6Netscape7Netscape8
Opera6Opera7Opera8Opera9Opera10
Firefox1Firefox2Firefox3Firefox4
Google Chrome1Google Chrome2Google Chrome3Google Chrome4Google Chrome5Google Chrome6
広告



このページでは、HTML4のa要素を解説しています。
a要素の最新情報は、以下を参照してください。

<A>タグはアンカー(Anchor)の略で、リンクの出発点と到達点を指定するタグです。
リンクの出発点ではhref属性でリンク先を指定します。

またファイルの特定の場所を到達点とする場合には、name属性かid属性を使用して、その場所に名前(識別子)をつけます。

■属性

href=”URI”
リンク先文書の指定
name=”名前”
文書内にリンク到達点とするための名前をつける
target=”フレーム名”
リンク先の文書を表示させるフレーム名
charset=”文字セット”
リンク先の文字コードセット
hreflang=”言語コード”
リンク先の言語コードセット
type=”MIMEタイプ”
リンク先のMIMEタイプ
rel=”リンクタイプ”
この文書から見たリンク先との関係
rev=”リンクタイプ”
リンク先から見たこの文書との関係
tabindex=”Tab移動の順番”
Tabキーを押した際の移動順を割り当てる
accesskey=”ショートカットキー”
ショートカットキーを割り当てる
shape=”領域の形状”
リンク領域の形状
coords=”領域の座標”
リンク領域の各座標

■使用例

HTMLソース

<a href=”https://htmqcom1.wpengine.com/tech/html/a”>相対パスでリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/a”>絶対パスでリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/index”>ひとつ上のディレクトリへ</a><br>
<a href=”mailto:info@htmq.com” class=”__cf_email__” data-cfemail=”c1a8afa7ae81a9b5acb0efa2aeac”>[email protected]“>メール</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/index”><img src=”https://htmqcom1.wpengine.com/wp-content/uploads/2024/07/logo.gif”
border=”0″></a><br>

↓↓↓

HTMLソース

<a name=”abc”>ファイルの途中にabcという名前を付けます</a><br>
<a href=”#abc”>abcと名前を付けた場所へリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/index#a”>別ファイルの名前を付けた場所へリンクします</a>

↓↓↓

HTMLソース

<a href=”https://htmqcom1.wpengine.com/tech/html/a” target=”_blank”>別画面を開いてリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/a” target=”_self”>リンク元と同じフレームにリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/a” target=”_parent”>ひとつ上の親フレームにリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/a” target=”_top”>フレームをすべて解除してリンクします</a><br>
<a href=”https://htmqcom1.wpengine.com/tech/html/a” target=”abc”>abcという名前のフレームにリンクします</a><br>

↓↓↓

※このサイトではフレームを使用していないので、target=”_parent”とtarget=”_top”の動きはtarget=”_self”と同じになります。
またabcという名前のフレームは設定していないのでtarget=”abc”の動きはtarget=”_blank”と同じになります。

■HTML5情報

<a> …… ハイパーリンクを指定する
広告


Lorem Ipsum is simply dummy text

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.