section to fix W3C validation errors.
W3C validation errors often appear in Webflow sites when you insert Facebook Pixel code, especially within <noscript>
tags inside the head. W3C expects <noscript>
to be used only within the body, not the head.
<noscript>
tag meant for browsers without JavaScript.<noscript>
in the head section violates standard W3C HTML5 rules.<head>
, causing validation issues.<noscript>
Tag to the BodyGo to Project Settings > Custom Code.
In the Head Code section, paste only the JavaScript like:
<!-- Facebook Pixel JavaScript -->
In the Before Tag section, paste just the noscript block:
<!-- Facebook Pixel noscript block -->
Typically, the noscript image pixel looks like this:
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=YOUR_PIXEL_ID&ev=PageView&noscript=1"/></noscript>
This moves the non-compliant tag from head to body, resolving validation errors.
<noscript>
tag is no longer flagged.To fix W3C validation errors from Facebook Pixel code, split the code: place the script portion in the Head Code, and the <noscript>
image tag in the Before section. This keeps your site standards-compliant while preserving Pixel functionality.