Andynic Posted July 17, 2013 Share Posted July 17, 2013 Hi, Does anyone have any idea why the W3 validation service returns the error shown below on this comment line?/* Set the values in the <img> tag so the user can see a mini-sample of what was selected */Error:=====Line 219, Column 40: required attribute "src" not specified… /* Set the values in the <img> tag so the user can see a mini-sample …✉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>.=====I've tried /* */ to enclose the comment and also //Thanks for your help.andynic Link to comment Share on other sites More sharing options...
justsomeguy Posted July 17, 2013 Share Posted July 17, 2013 It sounds like you're using a doctype like XHTML that requires Javascript code to be wrapped in CDATA comments or something like that. Link to comment Share on other sites More sharing options...
Andynic Posted July 17, 2013 Author Share Posted July 17, 2013 Thanks. That was it. Probelm solved: mismatch in <header> of the "comment" tokens <!-- ... //--> between <script> and </script> tags: probelm code: <script type="text/javascript"> <!-- javascript functions.... --> </script> Corrected: <script type="text/javascript"> <!-- javascript functions.... //--> </script> andynic Link to comment Share on other sites More sharing options...
jeffman Posted July 17, 2013 Share Posted July 17, 2013 Unless you're doing something else you haven't mentioned, comment tags like that have been obsolete for 10-12 years. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now