To dynamically add the provided keywords as meta tags in a Blogger blog, you can use JavaScript to inject them into the <head> section of your blog's HTML. Below is the JavaScript code that you can use to automatically add these keywords to the meta tags in Blogger.
JavaScript Code:
You can add this JavaScript code in the HTML of your Blogger theme, typically within the <head> section.
<script type="text/javascript">
// Keywords to be added to the meta tags
var keywords = "image file compressor png, jpeg pic size reducer online, jpg size compress below 50kb, online jpg compress below 20 kb, online photo compressor toolur, image compressor software, app to reduce image size, 300kb image compressor, best jpeg compression, bulk jpg compress, compress image below 30 kb, compress image less than 10 kb, compress image online for free, compress image to 100kb online jpg, compress images for web without losing quality, compress image to below 100kb, compress jpeg to 100kb free, compress jpg less than 1 mb, compress jpg to below 100kb, compress large jpg, compress large png, compress photo below 100kb";
// Function to add meta keywords dynamically
function addMetaKeywords() {
var metaTag = document.createElement('meta');
metaTag.name = "keywords";
metaTag.content = keywords;
// Append the meta tag to the head section of the document
document.getElementsByTagName('head')[0].appendChild(metaTag);
}
// Call the function to add the meta keywords when the document is loaded
window.onload = function() {
addMetaKeywords();
};
</script>
How it works:
- The
keywordsvariable: This holds all the keywords that you want to include as meta tags for the page. - The
addMetaKeywords()function: This function creates a new<meta>tag with the name "keywords" and adds the keywords content to it. - Appending the meta tag: The script appends the newly created meta tag to the
<head>section of the page, so that search engines and other crawlers can read it. window.onloadevent: This ensures that the function is executed once the page is fully loaded.
Where to Place the Code in Blogger:
- Go to Blogger.
- From the Blogger Dashboard, click on Theme.
- Click on Edit HTML.
- Paste the above JavaScript code right before the closing
</head>tag in the HTML editor. - Save your changes.
Important Notes:
- The
metakeyword tag isn't as influential for SEO as it used to be, but it can still be useful for helping search engines understand the content of your site and improve indexing. - The code will work across all pages where this script is included, so make sure the keywords are relevant to the content on those pages.