Title: HTML validation error
Last modified: March 3, 2022

---

# HTML validation error

 *  Resolved [Antonis Zachos](https://wordpress.org/support/users/anzach/)
 * (@anzach)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/html-validation-error-19/)
 * Hello,
 * The installation of the plugin causes an HTML Markup Validation Error.
 * _A script element with a src attribute must not have a type attribute whose value
   is anything other than the empty string, a JavaScript MIME type, or module._
 * I guess this refers to the “type=”text/plain” added by the plugin.
 * Any ideas?
 * Thanks in advance
 * A.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhtml-validation-error-19%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [WebToffee](https://wordpress.org/support/users/webtoffee/)
 * (@webtoffee)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/html-validation-error-19/#post-15432664)
 * Hi [@anzach](https://wordpress.org/support/users/anzach/),
 * Greetings from Webtoffee!
 * We change the type attribute value from “text/javascript” to “text/plain” in 
   order to block the scripts and this is the reason for the validation error. However,
   to avoid this you can modify the script like,
 * `<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXX"></script
   >`
 * to,
 *     ```
       <script>
       var ga_script = document.createElement('script');
       ga_script.src = "https://www.googletagmanager.com/gtag/js?id=G-XXXXXX";
       document.head.appendChild(ga_script);
       </script>
       ```
   
 *  Thread Starter [Antonis Zachos](https://wordpress.org/support/users/anzach/)
 * (@anzach)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/html-validation-error-19/#post-15437619)
 * Hello
 * Thank you for your valuable information
 * A.

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

The topic ‘HTML validation error’ is closed to new replies.

 * ![](https://ps.w.org/cookie-law-info/assets/icon.svg?rev=3007243)
 * [CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice)](https://wordpress.org/plugins/cookie-law-info/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-law-info/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-law-info/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-law-info/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-law-info/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-law-info/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Antonis Zachos](https://wordpress.org/support/users/anzach/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/html-validation-error-19/#post-15437619)
 * Status: resolved