Getting rid of the border around an image link.

How do you eliminate the  blue border around an image you've made a link.  I know there's a way, in HTML, to do that.  I just can't remember what the code is.

I think the image looks so much better without that border.

Thanks.
karlziiiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

inudaciCommented:
like this:

<a href=""><img src="" border=0></a>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dorwardCommented:
The border attribute is deprecated and should not longer be used, the modern way is CSS:

<head>
<title>foo</title>
<style type="text/css">
a img { border-style: none; }
</style>
0
inudaciCommented:
what browser does not support the border attr?
what requires more code?

post your answers in the css area...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

dorwardCommented:
a img { border-style: none; } - 29 bytes
 border="0" - 11 bytes PER IMAGE

So unless there are only two images that are links, the CSS requires less code.
0
porcupineCommented:
I don't think the difference in size makes much of a difference when your talking about a few characters,
Also it's worth noting that the CSS code dorward refered will not be supported by IE3 which is 2% of all Internet users, that is not much but it's worth noting.

By the way to say that border="0" is deprecated is not true because most sites use it, even Yahoo! uses it.
0
inudaciCommented:
whatever,
bigger chance a browser support border attr than stylesheet, and no one knows about the guy's intention of putting more than one image
0
dorwardCommented:
porcupine: Perhaps you should look up what "deprecated" means. It doesn't mean "not in common usage".

http://www.w3.org/TR/html4/struct/objects.html#adef-border-IMG

The last stats I saw suggest that IE 3 is used by about 0.02% of Internet users.

Cutting out the HTML 3.2 junk that was deprecated when HTML 4 was released makes sites easier to maintain and quicker to load.
0
porcupineCommented:
dorward: I stand corrected, I thought deprecated meant that it was not future-proof.

And as for the 2% stat that was based on the hits to my site in the last two years, so it may not be totally acurate.

The point I was crudely trying to make is that the border attribute is ok to use and browsers will always be backwards compatible whereas older browsers will not be futer compatible.
0
echobravo316Commented:
The easiest HTML way is this:

<img src="IMG LOCATION" border="0">
0
crosenblumCommented:
I agree, I love css, but it isn't 100% browser supported.

I'd rather have a standards approach, except for those pages that i know for sure who the browser is.
0
karlziiiAuthor Commented:
Thank you all for your comments.  The simple solution to my problem was offered by inudaci, first.  Thanks to all for adding to the exchange and experience.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.