HTML Links - Cheat Sheet

Syntax: 
<a href="url">link text</a>

Targets:

  • _self - Default. Opens the document in the same window/tab as it was clicked
  • _blank - Opens the document in a new window or tab
  • _parent - Opens the document in the parent frame
  • _top - Opens the document in the full body of the window

<!DOCTYPE html>
<html>
    <body>
        <a href="https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam" target="_self">
            Read about APJ in same tab</a><br>
        <a href="https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam" target="_blank">
            Read about APJ in new new tab</a><br>
        <a href="https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam" target="_parent">
            Read about APJ in parent frame</a><br>
        <a href="https://en.wikipedia.org/wiki/A._P._J._Abdul_Kalam" target="_top">
            Read about APJ in new window</a>
    </body>
</html>

Outcome:



No comments:

Post a Comment

HTML Forms - Input Types - Cheat Sheet

Popular Posts