Link Tag <link>……</link>

Abhi jangid
2 min readJul 10, 2021

--

What Is Link Tag And How It Use…..

Hey everyone

Today i am talling you that what is a link tag in the HTML and How it use …..

✔ Definition and Usage

The <link> tag defines a link between a document and an external resource.

The <link> tag is used to link to external style sheets.

✔ Differences Between HTML and XHTML

In HTML the <link> tag has no end tag.

In XHTML the <link> tag must be properly closed.

✔ Syntax of link tag in HTML — —

  1. Use the <a> element to define a link.
  2. Use the href attribute to define the link address.

<a href=”url”>link text</a>

✔ By default, links will appear as follows in all browsers:

  • An unvisited link is underlined and blue
  • A visited link is underlined and purple
  • An active link is underlined and red

👉 link Attribute —

🖍 HTML Links — The target Attribute

By default, the linked page will be displayed in the current browser window. To change this, you must specify another target for the link.

The target attribute specifies where to open the linked document.

The target attribute can have one of the following values:

  • _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

✔✔ Chapter Summary

  • Use the <a> element to define a link
  • Use the href attribute to define the link address
  • Use the target attribute to define where to open the linked document

Thanks for read my article 🙏

--

--