HTML Links

  • HTML links are hyperlinks.
  • HTML link default color is Blue.
  •  You can click a link and jump to another document/page.

              Syntax: url“>NIELITBHU

  • The (anchor) element to create the hyperlink.
  •  The href attribute is used to define the link address.
Example of HTML Links
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h4> HTML links</h4>
<a href="https://www.nielitbhu.com/">NIELITBHU</a>
</body>
</html>

Output

Page Title

HTML links

NIELITBHU

HTML target attribute

  • The target attribute is used to define where to open the linked document.
  •  _self – It is the default. Use _self target to open the linked document in the same window/tab.
  • _blank –Use _blank target to open the linked document in a new window or tab.
  • _top – Use _top target to open the linked document in the full body of the window.
Example of HTML target attribute
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h4> HTML target attribute</h4>
<p>The target attribute is used to define where to open the linked document.</p>
<h5>self target attribute</h5><br>
<a href="https://www.nielitbhu.com" target="_self">NIELITBHU</a>
<h5>blank target attribute</h5><br>
<a href="https://www.nielitbhu.com" target="_blank">NIELITBHU</a>
<h5>top target attribute</h5><br>
<a href="https://www.nielitbhu.com" target="_top">NIELITBHU</a>
</body>
</html>

Output

Page Title

HTML target attribute

The target attribute is used to define where to open the linked document.

self target attribute

NIELITBHU
blank target attribute

NIELITBHU
top target attribute

NIELITBHU

Image Hyperlink in HTML

  •  The <img> element ( inside <a> anchor element)is used For an image as a link.
Example of Image Hyperlink in HTML
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h4> Image Hyperlink in HTML</h4>
<a href="https://www.nielitbhu.com/"><img src="https://nielitbhu.com/wp-content/uploads/2022/01/26-jan.jpg"></a>
</body>
</html>

Output

 

Image Hyperlink in HTML

Set Height and Width Image Hyperlink in HTML

  • The width and height attributes is used to set the Image width and height.
Example of Image Hyperlink in HTML
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h4> Image Hyperlink in HTML</h4>
<a href="https://www.nielitbhu.com/"><img src="https://nielitbhu.com/wp-content/uploads/2022/01/26-jan.jpg" width="150px" height="150px" ></a>
</body>
</html>

Output

Page Title

Image Hyperlink in HTML

What is HTML
  • HTML is the standard  for Hypertext Markup Language for Web pages.
  • The HTML elements tell the browser ...
    Click Here
Previous topic next topic What is an Element in HTML
  • An Hypertext Markup Language(HTML) element ...
    Click Here
Previous topic next topic HTML Headings
  • The HTML headings are used to define the heading ...
    Click Here
Previous topic next topic HTML Formatting Elements
  • The <b>  element is use for bold text, without ...
    Click Here
Previous topic next topic HTML Comments
  • The HTML Comment are describe the extra feature about ...
    Click Here
Previous topic next topic HTML Attributes
  • Every HTML element can have attributes.
  • The HTML Attribute ...
    Click Here
Previous topic next topic HTML Images
  • The <img> tag is empty
Note: The empty ...
Click Here
Previous topic next topic HTML Links
  • HTML links are hyperlinks.
  • HTML link default color is ...
    Click Here
Previous topic next topic HTML Table
  • An HTML table is defined with the <table> tag.
  • ...
    Click Here
Previous topic next topic Table Backgrounds You can set the table background using one of the ...
Click Here
Previous topic next topic Table Header, tbody and Footer
  • Tables are categories into three parts: ...
    Click Here
Previous topic next topic Basic to Advance table design in HTML Example 1 <!DOCTYPE> <html> <body> ...
Click Here
Previous topic next topic HTML div tag
  • The <div>  element is used for style blocks ...
    Click Here
Previous topic next topic HTML Lists
  • The list is the way to present the data ...
    Click Here
Previous topic next topic HTML Form
  • The HTML <form> element is used to collect user ...
    Click Here
Previous topic next topic HTML Iframe Tag
  • <iframe> an inline frame with an HTML tag ...
    Click Here
English Hindi