0
1.4kviews
Explain links in HTML

Mumbai University > Information Technology > Sem 4 > Web Programming

Marks: 5M

Year: Dec 2014

1 Answer
0
5views
  • The link acts a pointer to some web page or some resource.
  • A web Site consists of multiple links; it allows building a relation among the web pages logically.
  • In HTML, this is achieved by anchor tag, <a>
  • Anchor tag has two main attributes, href and Target

href attribute:

  • The <a> defines the beginning of web link and </a> defines the end of web link.
  • The anchor tag consists of href attribute. This attribute specifies the target of the link.
  • For example, <a href=”www.google.com”>

target attribute:

  • This attribute helps in deciding the location to open a hyperlink
  • The location could be new window, same window, parent window and in full view
  • The various values of target attribute are:

    • self: loads the page into current page.
    • blank: loads the page into a new separate browser window
    • parent: loads the page into the frame that is superior to the frame the residing hyperlink
    • top: cancels all the frames, and loads in full browser window.

Example:

<html>

<head><title> HTML Links</title></head>

<body>

<a href=”www.kt280.com” target=”_blank”> Click here to visit Kt280</a>

</body>

</html>
Please log in to add an answer.