How to add Alt tag and Title tag to image in Blogspot automatically (without Jquery)
January 13, 2018
January 13, 2018
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqOvw6kJgR930gFZq8iNTqq3ukmtmmub65mJU6lurlceIK2nOkhkgAbLRvBffzKBKQ2APqmCcgZxG3U1WQvM_mGx3-ZihV0JGCOkMRkBvnu3-prCB0t_jJ79gdBgc8mXr3tG-r7RXEEao3/s640/add-alt-title-tag-image-blogazwin.png)
If you want to add Alt tag and Title tag for all images in your blogger post (even posts were published before), you can use following code:
<b:if cond='data:view.isSingleItem'>
<script type='text/javascript'>
//<![CDATA[
var y = document.getElementById("Blog1").getElementsByTagName("img");for (var i = 0; i < y.length;i++) {y[i].setAttribute("alt",document.title);y[i].setAttribute("title",document.title);};
//]]>
</script>
</b:if>
Note:1. No require Jquery library
2. Put that code before
</body>
3. Old alt tag and title tag of images will be replace by new tag above.
1 comments for How to add Alt tag and Title tag to image in Blogspot automatically (without Jquery)
thanks you for share
yalla shoot live
يلا شوت لايف