CSS No Image Border - How To

Most browsers will add a border, by default, around all your images. Adding border="0" to each IMG tag does the job (the attribute is obsoleted in HTML5 though, but by the time this becomes a standard you may still use it). Nevertheless, adding the attribute to all images on your site can be a major nuisance, especially if you decide at some point that you would want borders around certain images. 

Ever since the dark ages of the first CSS specifications you can use the CSS border attribute for your IMG tags. Set it to none and you are done.

CSS Code:

img {border: none}    

HTML Code:

    

Result:

Share

Learn how to design amazing websites