Hyperlinks in HTML

Hyperlinks

1) Mark the Google ia a search engine content.

< a > < / a >

2) Provide path or location hyper reference.

< a href="https://www.google.com"> < /a >

3) Hyperlink are used to link are webpage with some other document or other part of the document.

4) Hyperlink are created using the < a > (anchor) tag and are usually displayed as underlined text in the blue color.

5) To provide path or hyper refernce we have to use href attribute of < a > tag.

Anchor Tag

  • Anchor tag is used to create a hyperlink on the webpage.
  • It is container tag.
  • It is inline level element.
  • The content that we want to create as a hyperlink should be written with < a >---< / a >
  • Attribute of the Anchor Tag.

    href attribute

  • It is used to provide path or hyper refernce to the marked content.
  • When user click on hyperlink that hyperlink takes the user to the specified path given in href attribute.
  • Syntax: < a href="path" > < / a >
  • target attribute

  • It is used to specify where to open the hyperlink means taht our hyperlink will open in a new tab.
  • Example: < a href="image/dog.jpg" target="blank" > < / a >