Title: Plugin creates invalid HTML
Last modified: January 2, 2024

---

# Plugin creates invalid HTML

 *  Resolved [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-creates-invalid-html/)
 * When I enable the plugin, it creates code with `<style>` inside a `<div>`. This
   is not valid and causes validation errors when checking the site with [https://validator.w3.org/](https://validator.w3.org/):
 * > **Error****: ****Element [`style`](https://html.spec.whatwg.org/multipage/#the-style-element)
   > not allowed as child of element [`div`](https://html.spec.whatwg.org/multipage/#the-div-element)
   > in this context. **

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Matthias Kittsteiner](https://wordpress.org/support/users/kittmedia/)
 * (@kittmedia)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-creates-invalid-html/#post-17312265)
 * Hi Arno,
 * thank you for the report. I’m aware of that, but unfortunately have no real solution
   for it yet. For more information, see this identical report: [https://wordpress.org/support/topic/inline-styling-appears-to-break-html-validation/](https://wordpress.org/support/topic/inline-styling-appears-to-break-html-validation/)
 * Best regards,
   Matthias
 *  Thread Starter [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-creates-invalid-html/#post-17312356)
 * As far I understand the code, it is possible to change the <style> element to
   an online style of the outer container element.
 * Let’s continue this discussion on [https://github.com/epiphyt/embed-privacy/issues/198](https://github.com/epiphyt/embed-privacy/issues/198).
 *  Thread Starter [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-creates-invalid-html/#post-17313139)
 * I solved this by modifying the code for my own website. The modifications are
   available here: [https://github.com/arnowelzel/embed-privacy/commit/fec55784ce4dd0922590367775abf0998be7b2a2](https://github.com/arnowelzel/embed-privacy/commit/fec55784ce4dd0922590367775abf0998be7b2a2)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin creates invalid HTML’ is closed to new replies.

 * ![](https://ps.w.org/embed-privacy/assets/icon.svg?rev=2812349)
 * [Embed Privacy](https://wordpress.org/plugins/embed-privacy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/embed-privacy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/embed-privacy/)
 * [Active Topics](https://wordpress.org/support/plugin/embed-privacy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/embed-privacy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/embed-privacy/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/plugin-creates-invalid-html/#post-17313139)
 * Status: resolved