1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

aタグを別タブで開く方法

Posted at

ブログやサイトでaタグを使うときに、同じサイト内で遷移するなら別タブで開く必要はありませんが、別サイトへのリンクなら別タブで開いた方がいいでしょう。

なぜなら離脱されて戻ってこないかもしれませんから。

そこで、aタグを別タブで開く方法をご紹介します。

aタグを別タブで開く方法

まずは同じタブで開く方から。

index.html
<a href="https://www.google.com/?hl=ja">Google Link</a>

次に別タブで開く方。

index.html
<a href="https://www.google.com/?hl=ja" target="_blank">Google Link</a>

ポイントはtarget="_blank"をつけるだけ。
これだけで別タブで開くことができます。

忘れないように!!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?