When you enter an image the code will look something like this:
<img src=”images/banner.jpg” title=”Buy your widget” alt=”original widgets for sale”
width=”288″ height=”60″ />
OK, notice that anytime something is defined it is in quotes. Width=”288″, etc. That is part of valid XHTML code. You want to make sure this is the case if you’ve downloaded badge code from someplace else.
Another bit of bad code comes when you see a border definition. You don’t see that above, but in cases of bad code, you will see something like border=0. Border is not used in this way with valid code. Chances are you can delete that with no harm.
Sometimes, sometimes not, you will see no alt attribute. If it’s not there, define it–alt=”your text here”. Same with title. This shows up as a tooltip when someone places their mouse over the image.
If the height and width are not defined, you can make the image more search engine friendly if you do define them. Just right click the image and look at its properties. You can then get the values.
Now this one can be easy to miss, but do look for it because it’ll trigger a bunch of cryptic errors. You see that very last bit at the end of the image code–/>? That / will often be missing if the code is HTML and not XHTML. If it’s missing, add it.
My last tip has to do with those links added to badges, ads, etc. The links often contain characters that trigger an error when validating. Amazon links are good for this, I’ve noticed. These are the cases where you want to take advantage of sites like TinyURL, where you can copy and paste those long, nasty links and turn them into something more friendly. Don’t believe me? You can test the link when you create the tiny URL.
Here’s the checklist:
- Attributes in quotes
- Height and width defined
- Remove border=0
- Make sure alt and title attributes are present
- Make sure the image code ends />
- If necessary, compact URL
It’s not too bad. Once you look at the code, it’ll seem more logical to you. It’s all a part of making your images SE friendly.









If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: Monday Marketing Meeting–Making Your Images SE Friendly