Título SEO ()</label>
<div style="display: flex; gap: 8px; align-items: center;">
<span id="title-pixel-badge" style="font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: #0f172a; color: #00e676; border: 1px solid #334155;">0 px</span>
<span id="title-char-badge" style="font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: #0f172a; color: #cbd5e1; border: 1px solid #334155;">0 / 60 chars</span>
</div>
</div>
<input type="text" id="input-title" oninput="updateSERP()" placeholder="Introduce el título de la página (ideal: 50-60 caracteres / 580px)..." style="width: 100%; box-sizing: border-box; background: #0f172a; border: 1px solid #475569; border-radius: 6px; padding: 12px 14px; color: #ffffff; font-size: 15px; font-family: inherit; margin-bottom: 8px;">
<!-- Pixel Bar Meter -->
<div style="background: #0f172a; border-radius: 4px; height: 8px; overflow: hidden; margin-bottom: 10px; border: 1px solid #334155;">
<div id="title-meter-bar" style="background: #00e676; height: 100%; width: 0%; transition: width 0.15s ease, background-color 0.15s ease;"></div>
</div>
<!-- Live Title Status Advice -->
<div style="display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #94a3b8;">
<span id="title-status-text">Objetivo: 50-60 caracteres (menos de 600px desktop / 540px mobile)</span>
<button type="button" onclick="copyText('input-title')" style="background: transparent; border: none; color: #38bdf8; cursor: pointer; text-decoration: underline; font-size: 12px;">📋 Copiar Título</button>
</div>
</div>
<!-- Meta Description Section -->
<div style="background: #1e293b; padding: 20px 22px; border-radius: 10px; border: 1px solid #334155;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
<label for="input-desc" style="font-weight: 700; font-size: 16px; color: #c084fc;">Meta Descripción (<meta name='description'>)</label>
<div style="display: flex; gap: 8px; align-items: center;">
<span id="desc-pixel-badge" style="font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: #0f172a; color: #00e676; border: 1px solid #334155;">0 px</span>
<span id="desc-char-badge" style="font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: #0f172a; color: #cbd5e1; border: 1px solid #334155;">0 / 160 chars</span>
</div>
</div>
<textarea id="input-desc" oninput="updateSERP()" rows="3" placeholder="Introduce la meta descripción (ideal: 130-155 caracteres / 960px)..." style="width: 100%; box-sizing: border-box; background: #0f172a; border: 1px solid #475569; border-radius: 6px; padding: 12px 14px; color: #ffffff; font-size: 14px; font-family: inherit; margin-bottom: 8px; resize: vertical;"></textarea>
<!-- Pixel Bar Meter -->
<div style="background: #0f172a; border-radius: 4px; height: 8px; overflow: hidden; margin-bottom: 10px; border: 1px solid #334155;">
<div id="desc-meter-bar" style="background: #00e676; height: 100%; width: 0%; transition: width 0.15s ease, background-color 0.15s ease;"></div>
</div>
<!-- Live Desc Status Advice -->
<div style="display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #94a3b8;">
<span id="desc-status-text">Objetivo: 130-155 caracteres (menos de 960px desktop / 680px mobile)</span>
<button type="button" onclick="copyText('input-desc')" style="background: transparent; border: none; color: #38bdf8; cursor: pointer; text-decoration: underline; font-size: 12px;">📋 Copiar Descripción</button>
</div>
</div>
<!-- URL & Brand Settings -->
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px;">
<div style="background: #1e293b; padding: 16px 18px; border-radius: 10px; border: 1px solid #334155;">
<label for="input-url" style="font-weight: 700; font-size: 14px; color: #94a3b8; display: block; margin-bottom: 8px;">URL de Destino / Migas de Pan</label>
<input type="text" id="input-url" oninput="updateSERP()" placeholder="https://syncroma.com/blog/guide" style="width: 100%; box-sizing: border-box; background: #0f172a; border: 1px solid #475569; border-radius: 6px; padding: 10px 12px; color: #ffffff; font-size: 13px;">
</div>
<div style="background: #1e293b; padding: 16px 18px; border-radius: 10px; border: 1px solid #334155;">
<label for="input-brand" style="font-weight: 700; font-size: 14px; color: #94a3b8; display: block; margin-bottom: 8px;">Nombre de Marca / Sitio Web</label>
<input type="text" id="input-brand" oninput="updateSERP()" placeholder="Syncroma" style="width: 100%; box-sizing: border-box; background: #0f172a; border: 1px solid #475569; border-radius: 6px; padding: 10px 12px; color: #ffffff; font-size: 13px;">
</div>
</div>
</div>
<!-- Uppercase Analysis & Pro SEO Warnings Box -->
<div id="seo-warning-box" style="background: #1e293b; border-left: 4px solid #38bdf8; padding: 16px 20px; border-radius: 8px; margin-bottom: 28px; font-size: 13px; color: #cbd5e1;">
<div style="font-weight: 700; color: #ffffff; margin-bottom: 6px; font-size: 14px;">Diagnóstico Inteligente del Snippet SEO</div>
<div id="seo-warning-text">Evaluación en vivo del presupuesto de píxeles, límites de caracteres y anchura de tipografía.</div>
</div>
<!-- Technical Limits & Comparison Table -->
<div style="background: #12161f; padding: 24px; border-radius: 10px; border: 1px solid #334155; margin-bottom: 28px;">
<h3 style="font-size: 18px; font-weight: 700; color: #ffffff; margin-bottom: 14px;">Límites Oficiales en Píxeles y Estándares de la SERP de Google (2026)</h3>
<div style="overflow-x: auto;">
<table style="width: 100%; border-collapse: collapse; font-size: 13px; text-align: left;">
<thead>
<tr style="border-bottom: 1px solid #334155; color: #94a3b8;">
<th style="padding: 10px 12px;">Elemento</th>
<th style="padding: 10px 12px;">Límite Desktop</th>
<th style="padding: 10px 12px;">Límite Móvil</th>
<th style="padding: 10px 12px;">Caracteres Recomendados</th>
<th style="padding: 10px 12px;">Riesgo al Exceder</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom: 1px solid #1e293b;">
<td style="padding: 10px 12px; font-weight: 600; color: #38bdf8;">Title Tag (<title>)</td>
<td style="padding: 10px 12px;">580 - 600 px</td>
<td style="padding: 10px 12px;">540 - 560 px</td>
<td style="padding: 10px 12px;">50 - 60 caracteres</td>
<td style="padding: 10px 12px; color: #ff3366;">Corte con (...) y caída drástica de CTR</td>
</tr>
<tr style="border-bottom: 1px solid #1e293b;">
<td style="padding: 10px 12px; font-weight: 600; color: #c084fc;">Meta Description</td>
<td style="padding: 10px 12px;">960 - 990 px</td>
<td style="padding: 10px 12px;">680 - 700 px</td>
<td style="padding: 10px 12px;">130 - 155 caracteres</td>
<td style="padding: 10px 12px; color: #eab308;">Ignorada o reescrita por la IA de Google</td>
</tr>
<tr>
<td style="padding: 10px 12px; font-weight: 600; color: #00e676;">Breadcrumb / URL</td>
<td style="padding: 10px 12px;">Visible</td>
<td style="padding: 10px 12px;">Visible (compact)</td>
<td style="padding: 10px 12px;">Jerarquía limpia (/cat/slug)</td>
<td style="padding: 10px 12px; color: #94a3b8;">Parámetros feos (?id=) bajan CTR</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- FAQ Section (Visible Accordions + Schema) -->
<div style="background: #1e293b; padding: 24px; border-radius: 10px; border: 1px solid #334155; margin-bottom: 28px;">
<h3 style="font-size: 20px; font-weight: 700; color: #ffffff; margin-bottom: 18px;">Preguntas Frecuentes sobre Píxeles en la SERP de Google</h3>
<div style="margin-bottom: 16px;">
<h4 style="font-size: 15px; font-weight: 700; color: #38bdf8; margin-bottom: 6px;">¿Por qué Google corta los títulos por píxeles y no por número de caracteres?</h4>
<p style="font-size: 14px; color: #cbd5e1; margin: 0;">La interfaz de búsqueda de Google renderiza los títulos utilizando tipografía proporcional (Arial a 20 píxeles). En las fuentes proporcionales, las letras tienen anchuras distintas: una 'W' o 'M' mayúscula ocupa entre 18 y 20 píxeles, mientras que una 'i', 'l' o 't' minúscula apenas consume entre 4 y 6 píxeles. Por tanto, un título de 55 caracteres con muchas mayúsculas puede superar los 620px y cortarse, mientras que uno de 65 caracteres con letras estrechas puede verse entero.</p>
</div>
<div style="margin-bottom: 16px;">
<h4 style="font-size: 15px; font-weight: 700; color: #38bdf8; margin-bottom: 6px;">¿Cuál es el límite exacto de píxeles en Google Desktop y Mobile en 2026?</h4>
<p style="font-size: 14px; color: #cbd5e1; margin: 0;">En ordenadores (Desktop), el contenedor del título en Google mide aproximadamente 600 píxeles de ancho (margen seguro: 580px) y la meta descripción hasta ~960 píxeles. En dispositivos móviles, el contenedor es más estrecho: el título se corta a partir de los 540-560 píxeles y la descripción a partir de los 680-700 píxeles. Diseñar tus snippets por debajo de 540px en títulos y 680px en descripciones asegura visibilidad total en cualquier pantalla.</p>
</div>
<div style="margin-bottom: 16px;">
<h4 style="font-size: 15px; font-weight: 700; color: #38bdf8; margin-bottom: 6px;">¿Por qué escribir palabras en mayúsculas perjudica la visibilidad en Google?</h4>
<p style="font-size: 14px; color: #cbd5e1; margin: 0;">Sí, por dos motivos técnicos. Primero, por consumo de espacio: las mayúsculas ocupan entre un 30% y un 45% más de píxeles, provocando que Google corte el título mucho antes (a menudo en apenas 40 o 45 caracteres en vez de 60). Segundo, por psicología del usuario: el texto en mayúsculas sostenidas se percibe como spam o sensacionalismo de baja calidad, reduciendo el CTR orgánico.</p>
</div>
<div style="margin-bottom: 16px;">
<h4 style="font-size: 15px; font-weight: 700; color: #38bdf8; margin-bottom: 6px;">¿Por qué Google ignora a veces mi meta descripción y redacta la suya propia?</h4>
<p style="font-size: 14px; color: #cbd5e1; margin: 0;">Google reescribe las meta descripciones en más del 60% de las consultas cuando su algoritmo considera que el texto no responde directamente a la intención de búsqueda específica del usuario. Si tu meta descripción es demasiado corta (<80 caracteres), está truncada (>960px), contiene relleno de palabras clave o no incluye términos coincidentes con la consulta, Google extraerá automáticamente un fragmento de tu contenido.</p>
</div>
<div>
<h4 style="font-size: 15px; font-weight: 700; color: #38bdf8; margin-bottom: 6px;">¿Cómo influye la optimización de píxeles y el CTR en el posicionamiento SEO?</h4>
<p style="font-size: 14px; color: #cbd5e1; margin: 0;">Aunque los píxeles en sí no son un factor directo del algoritmo, el CTR orgánico y las señales de interacción del usuario son determinantes para mantener y escalar posiciones. Un título que comunica con claridad el beneficio sin quedar mutilado por puntos suspensivos capta un mayor volumen de clics. Además, colocar las palabras clave principales dentro de los primeros 400 píxeles garantiza su lectura inmediata por parte del usuario.</p>
</div>
</div>
<!-- Hidden Canvas for Exact Pixel Measurement -->
<canvas id="text-measure-canvas" style="display: none;"></canvas>
<!-- Interactive JavaScript Logic -->
<script>
var currentView = 'desktop';
// Character Pixel Width Map for Arial (Fallback for precision)
function measureTextPixels(text, font) {
var canvas = document.getElementById('text-measure-canvas');
if (canvas && canvas.getContext) {
var ctx = canvas.getContext('2d');
ctx.font = font;
return Math.round(ctx.measureText(text).width);
}
// Empirical fallback
var factor = (font.indexOf('20px') !== -1) ? 10.5 : 7.2;
return Math.round(text.length * factor);
}
function setViewMode(mode) {
currentView = mode;
var btnDesk = document.getElementById('btn-view-desktop');
var btnMob = document.getElementById('btn-view-mobile');
var container = document.getElementById('serp-container');
var indicator = document.getElementById('serp-device-indicator');
if (mode === 'desktop') {
btnDesk.style.background = '#00e676';
btnDesk.style.color = '#0f172a';
btnDesk.style.borderColor = '#00e676';
btnDesk.style.fontWeight = '700';
btnMob.style.background = '#1e293b';
btnMob.style.color = '#cbd5e1';
btnMob.style.borderColor = '#475569';
btnMob.style.fontWeight = '600';
container.style.maxWidth = '600px';
indicator.innerText = 'Desktop View (Max 600px)';
indicator.style.background = '#e8f0fe';
indicator.style.color = '#1a73e8';
} else {
btnMob.style.background = '#00e676';
btnMob.style.color = '#0f172a';
btnMob.style.borderColor = '#00e676';
btnMob.style.fontWeight = '700';
btnDesk.style.background = '#1e293b';
btnDesk.style.color = '#cbd5e1';
btnDesk.style.borderColor = '#475569';
btnDesk.style.fontWeight = '600';
container.style.maxWidth = '540px';
indicator.innerText = 'Mobile View (Max 540px)';
indicator.style.background = '#fef3c7';
indicator.style.color = '#b45309';
}
updateSERP();
}
function updateSERP() {
var titleInput = document.getElementById('input-title').value;
var descInput = document.getElementById('input-desc').value;
var urlInput = document.getElementById('input-url').value || 'https://syncroma.com/blog/seo-tools';
var brandInput = document.getElementById('input-brand').value || 'Syncroma';
// Limits based on view mode
var maxTitlePx = (currentView === 'desktop') ? 600 : 540;
var maxDescPx = (currentView === 'desktop') ? 960 : 680;
// Font for measurement (Google SERP uses Arial)
var titleFont = (currentView === 'desktop') ? '20px Arial' : '18px Arial';
var descFont = '14px Arial';
var titlePx = measureTextPixels(titleInput, titleFont);
var descPx = measureTextPixels(descInput, descFont);
var titleChars = titleInput.length;
var descChars = descInput.length;
// Update Badges
var titlePxBadge = document.getElementById('title-pixel-badge');
var titleCharBadge = document.getElementById('title-char-badge');
var descPxBadge = document.getElementById('desc-pixel-badge');
var descCharBadge = document.getElementById('desc-char-badge');
titlePxBadge.innerText = titlePx + ' px / ' + maxTitlePx + ' px';
titleCharBadge.innerText = titleChars + ' / 60 chars';
descPxBadge.innerText = descPx + ' px / ' + maxDescPx + ' px';
descCharBadge.innerText = descChars + ' / 160 chars';
// Update Meter Bars
var titlePercent = Math.min(100, Math.round((titlePx / maxTitlePx) * 100));
var descPercent = Math.min(100, Math.round((descPx / maxDescPx) * 100));
var titleBar = document.getElementById('title-meter-bar');
titleBar.style.width = titlePercent + '%';
if (titlePx > maxTitlePx) {
titleBar.style.backgroundColor = '#ff3366';
titlePxBadge.style.color = '#ff3366';
} else if (titlePx > (maxTitlePx - 40)) {
titleBar.style.backgroundColor = '#eab308';
titlePxBadge.style.color = '#eab308';
} else {
titleBar.style.backgroundColor = '#00e676';
titlePxBadge.style.color = '#00e676';
}
var descBar = document.getElementById('desc-meter-bar');
descBar.style.width = descPercent + '%';
if (descPx > maxDescPx) {
descBar.style.backgroundColor = '#ff3366';
descPxBadge.style.color = '#ff3366';
} else if (descPx > (maxDescPx - 80)) {
descBar.style.backgroundColor = '#eab308';
descPxBadge.style.color = '#eab308';
} else {
descBar.style.backgroundColor = '#00e676';
descPxBadge.style.color = '#00e676';
}
// Truncate for SERP display
var displayTitle = titleInput || 'Título de tu Página en los Resultados de Búsqueda | Marca';
if (titlePx > maxTitlePx) {
// Approximate truncation with ellipsis
var cutLen = Math.floor(titleInput.length * (maxTitlePx / titlePx)) - 3;
displayTitle = titleInput.substring(0, Math.max(10, cutLen)) + ' ...';
}
var displayDesc = descInput || 'La descripción de tu página aparecerá aquí en los resultados de búsqueda tal y como la renderiza Google.';
if (descPx > maxDescPx) {
var cutDescLen = Math.floor(descInput.length * (maxDescPx / descPx)) - 3;
displayDesc = descInput.substring(0, Math.max(20, cutDescLen)) + ' ...';
}
// Update SERP preview box
document.getElementById('serp-title-preview').innerText = displayTitle;
document.getElementById('serp-desc-preview').innerText = displayDesc;
document.getElementById('serp-brand-preview').innerText = brandInput;
document.getElementById('serp-url-preview').innerText = urlInput;
document.getElementById('serp-favicon').innerText = brandInput.charAt(0).toUpperCase();
// Uppercase Penalty Check
var uppercaseCount = (titleInput.match(/[A-Z]/g) || []).length;
var uppercaseRatio = titleChars > 0 ? (uppercaseCount / titleChars) : 0;
var warningBox = document.getElementById('seo-warning-box');
var warningText = document.getElementById('seo-warning-text');
if (titlePx > maxTitlePx) {
warningBox.style.borderLeftColor = '#ff3366';
warningText.innerHTML = '<strong style="color: #ff3366;">⚠️ ¡Título truncado en la SERP de Google!</strong> ' + (titlePx - maxTitlePx) + 'px de exceso. Las palabras clave del final se cortarán con puntos suspensivos (...).';
} else if (uppercaseRatio > 0.35 && titleChars > 15) {
warningBox.style.borderLeftColor = '#eab308';
warningText.innerHTML = '<strong style="color: #eab308;">⚠️ ¡Exceso de letras mayúsculas detectado!</strong> Las mayúsculas (W, M, D) ocupan hasta un 40% más de píxeles que las minúsculas. Acorta el texto para evitar que se corte antes de tiempo.';
} else if (descPx > maxDescPx) {
warningBox.style.borderLeftColor = '#eab308';
warningText.innerHTML = '<strong style="color: #eab308;">⚠️ ¡Meta descripción sobrepasa el presupuesto de píxeles!</strong> ' + (descPx - maxDescPx) + 'px de exceso. Las palabras clave del final se cortarán con puntos suspensivos (...).';
} else {
warningBox.style.borderLeftColor = '#00e676';
warningText.innerHTML = '<strong style="color: #00e676;">✓ ¡Dimensiones Óptimas del Snippet!</strong> Tu título y meta descripción encajan perfectamente en los límites de renderizado de Google tanto en ordenador como en móvil.';
}
}
function loadPreset(type) {
var isEn = document.getElementById('seo-pixel-counter-app').innerHTML.indexOf('Read and use the calculator') !== -1;
if (type === 'saas') {
document.getElementById('input-title').value = isEn ? 'AI Workflow Automation for Developers | Fast & Scalable Pipeline' : 'Automatización de Workflows con IA para Devs | Pipeline Escalable';
document.getElementById('input-desc').value = isEn ? 'Accelerate engineering throughput by 40%. Deploy autonomous agents, monitor token costs in real time, and scale workloads seamlessly. Start free trial today.' : 'Multiplica la velocidad de entrega de tu equipo técnico. Despliega agentes autónomos, audita costes de tokens en tiempo real y optimiza tus despliegues. Prueba gratis.';
document.getElementById('input-brand').value = 'AgentFlow';
document.getElementById('input-url').value = 'https://agentflow.io/pricing';
} else if (type === 'ecommerce') {
document.getElementById('input-title').value = isEn ? 'Ergonomic Standing Desk Pro 160x80cm - Solid Oak Top & Dual Motor' : 'Mesa Elevable Ergonómica Pro 160x80cm - Roble Macizo y Motor Doble';
document.getElementById('input-desc').value = isEn ? 'Premium motorized standing desk with 4 memory presets, anti-collision sensor, and 120kg weight capacity. Free shipping and 5-year warranty included.' : 'Escritorio elevable motorizado con 4 memorias de altura, sensor antichoque y capacidad de 120 kg. Envío gratuito en 24h y 5 años de garantía oficial.';
document.getElementById('input-brand').value = 'DeskCraft';
document.getElementById('input-url').value = 'https://deskcraft.com/standing-desk-pro';
} else if (type === 'blog') {
document.getElementById('input-title').value = isEn ? 'PostgreSQL vs MySQL in 2026: Benchmark, Latency & JSONB Indexing' : 'PostgreSQL vs MySQL en 2026: Benchmark, Latencia e Índices JSONB';
document.getElementById('input-desc').value = isEn ? 'Deep architectural comparison under heavy production workloads. Explore P99 latency, connection pooling limits, vacuum performance, and actual memory footprint.' : 'Comparativa arquitectónica en producción real. Analizamos latencia P99, límites de conexión, impacto de vacuum y consumo de memoria sin rodeos corporativos.';
document.getElementById('input-brand').value = 'Syncroma';
document.getElementById('input-url').value = 'https://syncroma.com/postgresql-vs-mysql-benchmark';
} else if (type === 'local') {
document.getElementById('input-title').value = isEn ? 'Emergency Plumber in Madrid 24/7 - Arrival in 30 Min | Fixed Prices' : 'Fontanero Urgente en Madrid 24 Horas - Llegada en 30 Minutos';
document.getElementById('input-desc').value = isEn ? 'Certified local plumbing specialists available 24 hours a day. Leak repairs, pipe unclogging, and boiler installation. No hidden fees. Call us now!' : 'Especialistas certificados en fontanería urgente 24h en toda la Comunidad de Madrid. Reparación de fugas, desatascos y calderas sin sorpresas en factura.';
document.getElementById('input-brand').value = 'MadridFont';
document.getElementById('input-url').value = 'https://madridfontaneria24h.es/urgencias';
}
updateSERP();
}
function copyText(id) {
var copyInput = document.getElementById(id);
copyInput.select();
copyInput.setSelectionRange(0, 99999);
navigator.clipboard.writeText(copyInput.value);
}
// Initialize with blog preset on load
window.addEventListener('DOMContentLoaded', function() {
loadPreset('blog');
});
</script>
</div>
<!--kg-card-end: html--></body>