Monday, September 24, 2012
0
Monday, September 24, 2012
Unknown
SEO optimization by altering image using alt for blog and website
SEO optimization by altering image using alt for blog and website
SEO image optimization was already posted as useful optimization by altering image size and "alt text" for blog and website click here to view now i found a use full codes that make the alt text for image by itself as soon as it is included.
SEO optimization is very important for blog to be SEO friendly like larger website ,as myself tired of writing alt text for each image in blog i found this article.
Now dont worry of writting each time as this tutorial will help you to add alt text automaticaly.
step 1:
Login to blog .
step 2:
Then now clcik template and click proceed.
step 3:
Then search for </body> tag by using CTRL+F.
step 4:
Then copy and paste the below code before that tag.
<!--SEO script www.blog4al.com start-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery
/1.7.2/jquery.min.js" type="text/javascript">
//SEO SCRIPT POWERED BY www.blog4al.com
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$('img').each(function(){
var $img = $(this);
var filename = $img.attr('src')
$img.attr('title', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));
$img.attr('alt', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));
});
});
//]]>
</script>
<!--SEO script www.blog4al.com end-->
step 5:
Then save the template as you wont see the result in preview.
step 6:
The work you must want to every time while uploading is just give the title properly.
Advantage :
This code also generate the title for image you can check that by moving cursor over the image and it will display the +1 button in image also.
Then save the template as you wont see the result in preview.
step 6:
The work you must want to every time while uploading is just give the title properly.
Advantage :
This code also generate the title for image you can check that by moving cursor over the image and it will display the +1 button in image also.
Related Articles :
Do you like this article? Spread the words!
If you enjoyed this post, please consider leaving a comment or subscribing to the E-mail feed to have future articles delivered to your feed reader.
Subscribe to:
Post Comments
(
Atom
)
0 Responses to “ SEO optimization by altering image using alt for blog and website ”
Post a Comment