I got the following W3C validation error, anyone know what it means and what I need to do to fix it? Error Line 4, Column 107: required attribute "type" not specified …m/wp-content/w3tc/min/af662d6c8edd6ede7e7667dff58500cc.1119815148.js"></script> The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. Code (markup):
Thanks! That makes sense. However I am having trouble finding where to add the type="text/javascript" It is a Wordpress blog and I have looked under the index.php and header.php files in my WP CP, but can't find that specific link. Any suggestions?
Browsers no longer need the 'type' attribute and it's been changed in the HTML5 spec so that <script> always means javascript and <style> always means css EXCEPT when the 'type' attribute is used and indicates otherwise. The HTML 4.01 validator will still flag it, though.
Usually, there is not much to worry about unless you are being evaluated on if your website validates (like for a competition or school project that the teacher wants you to validate it). But, as for your case, some WordPress plugins don't really care about validation and therefore don't add type="style/css" or type="text/javascript". If you don't really need validation, don't worry, because it won't even affect your website in a negative way because you are making sites for humans to do, not robots (unless you are very picky about seo). But, it is also debatable that validation affects your seo rankings, some say they do, some say they don't. I cant really help you much unless you provide a url here. I would just say, focus on the big picture.
Humans view the internet through a browser which, essentially, is a robot. Validation ALWAYS makes the browser's job easier. Ignoring validation is a peril to your site.