Central Air Installation Cost Calculator

#seo-analyzer-tool { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; background: #f9f9f9; border: 1px solid #ccd0d4; padding: 20px; max-width: 100%; border-radius: 4px; color: #32373c; } #seo-analyzer-tool h3 { margin-top: 0; color: #23282d; border-bottom: 2px solid #007cba; padding-bottom: 10px; } .seo-input-group { margin-bottom: 15px; } .seo-input-group label { display: block; font-weight: bold; margin-bottom: 5px; } .seo-input-group input, .seo-input-group textarea { width: 100%; padding: 8px; border: 1px solid #8c8f94; border-radius: 4px; box-sizing: border-box; } .seo-btn { background: #007cba; color: #fff; border: none; padding: 10px 20px; cursor: pointer; border-radius: 4px; font-weight: 600; } .seo-btn:hover { background: #006799; } #seo-results { margin-top: 20px; padding: 15px; background: #fff; border-left: 4px solid #007cba; display: none; } .seo-stat { margin-bottom: 8px; } .seo-good { color: #46b450; font-weight: bold; } .seo-bad { color: #dc3232; font-weight: bold; } .seo-warn { color: #ffb900; font-weight: bold; }

On-Page SEO Analyzer

function runSeoAnalysis() { var title = document.getElementById('seo_title').value; var desc = document.getElementById('seo_desc').value; var body = document.getElementById('seo_body').value; var resultsDiv = document.getElementById('seo-results'); resultsDiv.style.display = 'block'; // Title Check var titleLen = title.length; var titleMsg = "Title Length: " + titleLen + " characters. "; if (titleLen >= 50 && titleLen <= 60) { document.getElementById('res_title').innerHTML = titleMsg + "Optimal"; } else { document.getElementById('res_title').innerHTML = titleMsg + "Too " + (titleLen < 50 ? "short" : "long") + ""; } // Description Check var descLen = desc.length; var descMsg = "Meta Description Length: " + descLen + " characters. "; if (descLen >= 120 && descLen <= 160) { document.getElementById('res_desc').innerHTML = descMsg + "Optimal"; } else { document.getElementById('res_desc').innerHTML = descMsg + "Aim for 120-160"; } // Word Count var wordCount = body.trim() === "" ? 0 : body.trim().split(/\s+/).length; var wordMsg = "Word Count: " + wordCount + " words. "; if (wordCount >= 600) { document.getElementById('res_words').innerHTML = wordMsg + "Good for SEO"; } else if (wordCount > 0) { document.getElementById('res_words').innerHTML = wordMsg + "Thin content (Aim for 600+)"; } else { document.getElementById('res_words').innerHTML = wordMsg + "Please add content."; } // Keyword focus helper logic if (title !== "" && body !== "") { var firstWord = title.split(' ')[0].toLowerCase(); var regex = new RegExp(firstWord, "gi"); var matches = body.match(regex); var count = matches ? matches.length : 0; var density = ((count / wordCount) * 100).toFixed(2); document.getElementById('res_density').innerHTML = "Keyword Density ('" + firstWord + "'): " + density + "% (" + count + " occurrences)"; } }

Leave a Comment