0
1

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 5 years have passed since last update.

クリックしたときに別タブで開くように設定する方法

Posted at

htmlで、aタグの中にhrefと合わせて「target="_blank"」を追記。

<a href="リンク先のURL" target="_blank">ここをクリックすると別タブで開きます</a>

これでクリックすることで別タブにを開いてジャンプするようになります。

また、aタグの中にimgタグを入れることで、画像をクリックして別タブで開くように設定することもできます。

<a href="リンク先のURL" target="_blank"><img scr="画像ファイル">
</a>

※画像ファイルは絶対参照(http://testdirectory/test.png)
でも相対参照(test/ping)でもどちらでもOK。

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?