Zed-King Institute

    HTML Link That Opens in a New Tab (target="_blank")

    easyImages and linksHTML

    The <a> (anchor) tag makes text clickable; target decides where the link opens.

    The question

    Create a hyperlink with the text "ZedKing" that opens https://zedking.in in a new browser tab.

    The code

    index.html

    <a href="https://zedking.in" target="_blank">ZedKing</a>

    Result

    How it works

    1. 1href is the address the link goes to.
    2. 2The text between <a> and </a> is what the reader clicks.
    3. 3target="_blank" opens the address in a new browser tab.

    Common mistakes

    • Forgetting https:// — the browser then treats the address as a file on your site.
    • Writing target="blank" without the underscore.

    Now solve a similar question yourself

    A new HTML / CSS / JS question every time, checked instantly.

    Practice questions

    More in Images and links