How to Make Auto Image Alt Tag Title. © Why are photos or graphics require "alt" and "title" because the robot can not see or read image on google so "alt" and "title" is used for the description so that the robot can recognize googlebot or google image. Besides the installation of "alt" and "title" is also an SEO optimization.
1.Login to Blogger
2.Go to Design ---> Edit HTML And Then expand template widget
3.Copy this code :
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function() {
$('img').each(function(){
var $img = $(this);
var filename = $img.attr('src')
$img.attr('alt', filename.substring((filename.lastIndexOf('/'))+1, filename.lastIndexOf('.')));
});
});
//]]>
</script>
<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('.')));
});
});
//]]>
</script>
4.Put In Under </body> ( You can Try CTRL+F ) ( To Find </body> )
5.Save The Template...( Finish ) :0
No comments:
Post a Comment