Remove border of image: CSS, HTML

Remove border of image: CSS, HTML

HTML is the language most used to build web pages. It provides a lot of flexibility in building interactive and dynamic web pages. For example, you can use an image as a clicking button for a particular link. The problem is that the browser displays a border around this image. To remove the border in HTML/CSS, you need to change the required attributes. In this case you will have to set the attribute of the border as zero.

How to remove the border of a clickable image?

You made a clickable image by using the IMG tag within a <a href=""></a> link and the browser displays a frame or more precisely a border around the image.

There are two ways to deleting this border:

HTML solution

Use the attribute BORDER = "0" in the tag <IMG>. For example:

<A HREF="jak58.html"><IMG SRC="pic1.gif" ALT="My picture." BORDER="0"></A>

CSS solution

In the stylesheet, define the code below:

a img  
{  
border: none;  
}  
Need more help with images? Check out our forum!