Monday, November 8, 2010

Search engine optimization - SEO

Images:  Use the alt attribute to provide descriptive text. In addition, we recommend using a human-readable caption and descriptive text around the image.

Javascript: Place the same content from the Javascript in a no script tag. If you use this method, ensure the contents are exactly same as what is contained in the Javascript and that this content is shown to visitors who do not have Javascript enabled in their browser.

Videos: Include descriptive text about the video in HTML. You might also consider providing transcripts.


HTML Image Tags

<>  : Defines an image
<>    : Defines an image-map
<> : Defines a clickable area inside an image-map


In HTML the <> tag has no end tag. 
In XHTML the <> tag must be properly closed.


Not so good:
< src = "puppy.jpg" alt= "">

Better:
 <  img src="puppy.jpg" alt="puppy">

Best: 
< src="puppy.jpg" alt="Dalmatian puppy playing fetch">


Tip:

The alt attribute is meant to be used as an alternative text if the image is not available, not as a mouse-over text. To show a mouse-over text on images or image-maps, use the title attribute, like this:

<  img src="angry.gif" alt="Angry face" title="Angry face" />


To be avoided
< src="puppy.jpg" alt="puppy dog baby dog pup pups puppies doggies pups litter puppies dog retriever labrador wolfhound setter pointer puppy jack russell terrier puppies dog food cheap dogfood puppy food">


To compare and contrast, here are the file sizes of the above graphic in various formats:


JPG, 60 quality - 32K
PNG-8, 256 colors - 37K
GIF, 256 colors - 42K
PNG-24 - 146K

No comments: