Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix W3C validation warnings: type attribute

Discussion in 'Misc WordPress Requests' started by Diana, Jan 17, 2018.

  1. Diana


    W3C validation warnings: type attribute, by Diana


    After deactivating all plugins and switching to Twenty Seventeen theme, I can see a huge quantity of warnings.

    The type attribute is unnecessary for JavaScript resources.


    The type attribute for the style element is not needed and should be omitted.

    After a Google search, I have found some pages that provide useful functions for get rid of the type attribute.




    The fact is that none of the presented functions remove all the type=”text/javascript” and type=”text/css”, for some factors, for example, how scripts and styles are enqueued or if they use single or double quotes.

    I have two questions:
    1. Has WordPress any plan to get rid of these warnings in order to follow W3C guidelines?

    2. Can someone please provide a function in order to remove all these warnings? Please, if you don’t care about W3C warnings, do not reply to this post.

    Thank you.

    W3C validation warnings: type attribute

Share This Page

Monarch Social Sharing Plugin