HTML Links and Image Links

This “HTML Links and Image Links” post provides complete information about how to create HTML links in web pages using anchor tag and how to create image links.


HTML Links:

  • These are defined with the <a> tag.
  • It is a non-empty element.
  • Anchor tag having an attribute “href” that represents the address of the link.
  • A source can be a text file, video file….
  • User can identify the link using the name displayed on web page.

 

<html>
<body>
<a href=”http://www.java2python.com”>HTML tutorial link</a>
</body>
</html>

 

<html>
<head> </head>
<body>
<a href=”http://www.google.com”>open google</a></br>
<a href=”abc.txt”>Open txt file</a></br>
<a href=”blog.png”>Open image</a></br>
<a href=”oceans.mp4″>Open video</a></br>
</body>
</html>


HTML Images:

  • <img> tag is used to display images on the web page .
  • It is an Empty element.
  • <img> tag having an attribute “src” that represents a specific resource address.
  • alternative text about image (alt), and size (width and height) are provided as attributes.

<html>
<body>
<img src=”blog.png” title=”blogspot” alt=”http://java2python.com/blog/” width=”600″ height=”600″/>
</body>
</html>


Next Topic: marquee tag in HTML – HTML Tutorial

Share this