Validation Errors #2 - Post ID 215530

User 2298217 Photo


Registered User
10 posts

I used W3C Mark Up Validation and found several errors on my VSD website. I fixed most of them, but there's two more that I can't figure out how to correct (see below). Any suggestions would be greatly appreciated!

Best,
Margaret

Validation Output: 2 Errors

Error Line 179, Column 115: there is no attribute "DATA-SHOW-COUNT"
…class="twitter-follow-button" data-show-count="false">Follow @margaretedits</a>
?
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Error Line 180, Column 8: required attribute "TYPE" not specified
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.te…
?
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>.

www.margaretedits.com
Margaret Puskar-Pasewicz
MargaretEdits
margaret@margaretedits.com
www.margaretedits.com
User 1948478 Photo


Senior Advisor
1,850 posts

Both of those 'errors' are associated with the code you obtained from Twitter. These kinds of errors often show up for vendor-specific code that is not generically recognized by the validator. If the code works as intended, it's usually not worth the trouble to try and modify the code to make it validate.

The attribute "DATA-SHOW-COUNT" is vendor-specific and is recognized by Twitter but not by the generic validator. If the code works as intended in all browsers, which it seems to do, I would just leave it as is and accept the presence of the validation error.

The second 'error' is the result of Twitter using the latest markup specification (HTML5), where the type of script is no longer required to be specified.
In the prior markup specification (HTML 4.01), which is specified in the very first line of your page code, the 'type' is required in the <script> tag as follows:

<script type="text/javascript">.....

If you really, really, REALLY want to eliminate this particular markup 'error', you could modify the markup on line 180 by replacing "<script>..." with "<script type="text/javascript">....."

User 2298217 Photo


Registered User
10 posts

Thanks so much!!
Margaret Puskar-Pasewicz
MargaretEdits
margaret@margaretedits.com
www.margaretedits.com
User 271657 Photo


Ambassador
3,816 posts

I wouldn't make myself crazy over outside code. Just insert a Google map and see what that does for your validation :lol:
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.