back

CodeWithRahul

More
  • Home
  • Cources
  • Tutorials
  • Tutorials
  • Projects
  • Notes
  • Contact
  • Work With Us
  • HTML
  • CSS
  • JAVASCRIPT
  • CC++
  • PHP
  • PYTHON
  • REACT JS
  • DSA

RahulGoswami.com

Create an account
  • INTRODUCTION
    • HTML Introduction
    • HTML Working
    • HTML Prerequisite
    • HTML Document
    • HTML Structure 1
    • HTML Page
    • HTML Structure 2
    • HTML Editor
    • HTML View Source
    • HTML Tags
    • HTML Element
    • VS Code
    • installation
  • HTML BASIC TAGS
    • Skeletal Tags
    • Heading Tags
    • Paragraph Tag
    • Horizontal Line Tag
    • Line Break Tag
    • Center Tag
    • Preserve
    • Formatting Tag
  • HTML FORMATTING TAGS
    • Monospaced Font
    • Text Abbreviation Tag
    • Acronym Tag
    • Text tags
  • HTML QUOTATIONS
    • Blockquote Tag
    • Quote Tag
    • Text Citation Tag
    • Text Direction Tag
    • Address Text Tag
    • Code Tag
  • HTML ATTRIBUTES
    • HTML Attributes
    • HTML Core
    • Attributes 1
    • Attributes 2
    • HTML Generic
  • HTML LINKS
    • HTML Links
  • HTML COMMENTS
    • HTML Comments
  • HTML IMAGES
    • HTML Images
  • HTML LISTS
    • HTML Lists
    • HTML Unordered List
    • HTML Ordered List
    • HTML Definition List
  • HTML TABLES
    • HTML Tables
  • HTML BLOCK ELEMENT
    • HTML Block
    • Elements
  • HTML INLINE ELEMENT
    • HTML Inline
    • Elements
  • HTML FORMS
    • FORM Introduction
    • More on forms

    HTML Links

    What are HTML LINKS?

    • These are specified by <a> tag.
    • HTML LINKS are also known as HYPERLINK.
    • <a> tag is known as an Anchor tag.
    • <a> tag has its corresponding </a> tag.
    • These are used to link one document with another document.

    Syntax:

    <a href="index.html">
    // Content
    </a>

    HTML Link uses two attributes :

    1. href attribute: Without this tag, we are unable to go to the next page or the next document. This attribute is compulsorily used by the <a> tag. This attribute contains a URL path.

    2. target attribute: The link tag uses another attribute which is the target attribute. By default, if we open any link then the page will be displayed in the current browser window. But if we wish to change these settings then we use the target attribute. It tells us where we want our linked document to be opened.

      This target attribute can use any of the values:

    • _blank: Opens linked document in a new window
    • _top: Opens document in the full body of the window
    • _self: Opens document in the same window
    • _parent: Opens linked document in a parent frame

    Link to a Page section:

      This target attribute can use any of the values:

    • use the name attribute or id attribute
    • use hyperlink with # place where you want to go on a webpage.

    Link Colors:

      Three types of links are there: active, visited, and unvisited.

    • Active: It is in red with an underline.
    • Visited: It is purple and underlined.
    • Unvisited: It is blue and underlined.
    • By CSS we can change the color of the links.

    Owner of this WebPage Image

    CodeWithRahul

    Copyright © 2023 CodeWithRahul.com