HTML Anchor

Links are specified in HTML using the <a> tag. Links allow users to click their way from page to page. You can click on a link and jump to another document. The "href" attribute is the most important attribute of the HTML <a> tag.

See this example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of HTML Links</title>
</head>
<body>
   <p><a href="https://nexladder.com/" title="Visit Nexladder!">Visit Nexladder!</a>.</p>  
   <p><a href="https://nexladder.com/html-tutorial" title="Click for HTML Tutorial!">Click for HTML Tutorial!</a>.</p>  
 </body>
</html>

HTML Links - The target Attribute

The target attribute specifies where to open the linked document.

  • _blank - Opens the linked document in a new window or tab
  • _self - Opens the linked document in the same window/tab as it was clicked (this is default)
  • _parent - Opens the linked document in the parent frame
  • _top - Opens the linked document in the full body of the window
  • framename - Opens the linked document in a named frame