Creating images as links with no borders in HTML.

Asked By 0 points N/A Posted on -
qa-featured

I want to create images as link in a web page with no borders using HTML tag.

SHARE
Best Answer by Sharath Reddy
Answered By 0 points N/A #99794

Creating images as links with no borders in HTML.

qa-featured

As a beginner you have to know that no border means border =”0”. Now describe in more detail. For example , <a href="http://www.google.com">  <img SRC="name of any image as you like " border="0" alt="Logo"> </a>.

Now describe all this first the tag <a href="http://www.google.com"> </a> means that if the image is clicked then the new page come which address is  http://www.google.com here you give the link address which you need to.

The tag  <img SRC="name of any image as you like.jpg " border="0" alt="Logo">  means your image source, give border to 0 is border none alt=logo mean when image is not loaded the text come.

Best Answer
Best Answer
Answered By 562865 points N/A #99795

Creating images as links with no borders in HTML.

qa-featured

I was first confused when I saw your post. I know that when creating an HTML image tag, the output image has no border by default. So, if you will be inserting just an image with no border in an HTML document you don’t have to specify the border attribute in the image tag:

<img src=”URL” alt=”text”> and not like this: <img src=”URL” alt=”text” border=”size px”>

This is how it is properly inserted if it is only a plain image, the border attribute is not necessary if you don’t want it to have a border even if you set it to zero “0”. But if the image will be used as an inclusion in an anchor tag “<a>…</a>” similar to creating a button or merely to create a clickable image to direct to something else, that’s when the border attribute is required. By default, the border attribute is required to create a border around the image if it is inside the “<a>…</a>” tag.

<a href=”URL”><img src=”URL” alt=”text” border=”size px”></a>

But just like before, you only need to add the border attribute if you want to add a border around the clickable image. You can remove the border attribute if you don’t want the image to have a border. But you can always add it and set it to zero just to make sure that the image will not have a border around it something like border=”0”. And in addition, the border attribute in the image tag is not supported in HTML5 so if you will be creating an HTML5 webpage, adding the border attribute will be ignored.

Login/Register to Answer

Related Questions