Support » Plugin: Smart Cookie Kit » Style attribute in body is not allowed by HTML

  • Hi,

    I’ve noticed that this plugin appends its <style> element to the <body>.

    Even if this works in almost any browser I’ve trued, HTML5 standard does not allow <style> elements in <body>, so you will experience a validation error if you try to submit your page at

    Error: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
    Contexts in which element style may be used:
    - Where metadata content is expected.
    - In a noscript element that is a child of a head element.

    The fix should be easy and should not break compatibility: it is enough to enqueue the style element to the head instead of the footer (plugin_frontend.php, line 46).


    • This topic was modified 3 months, 3 weeks ago by giti.
    • This topic was modified 3 months, 3 weeks ago by giti. Reason: add link to standard
Viewing 1 replies (of 1 total)
  • Plugin Author shark986


    Hello @giti,
    thankyou for reporting me this bug, you are right!
    I have included the bugfix in the next release (v.2.2.3) of the plugin.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.