开发者

Like Button And W3C Errors

开发者 https://www.devze.com 2023-04-07 06:45 出处:网络
Im using this like code on my website and W3C Dont Like It Can someone please give me the right code i should use to pass so i know where im going wrong please see code at http://www.justvibe.co.uk/ a

Im using this like code on my website and W3C Dont Like It Can someone please give me the right code i should use to pass so i know where im going wrong please see code at http://www.justvibe.co.uk/ as i cant seam to post it up.

Thanks Dan

*ERRORS*** Validation Output: 7 Errors Line 37, Column 105: required attribute "type" not specified…ect.facebook.net/en_US/all.js#xfbml=1">

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 and type="text/javascript" for .

Line 37, Column 129: there is no attribute "href"…ll.js#xfbml=1">

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 element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 37, Column 163: there is no attribute "send"…ref="http://www.justvibe.co.uk/" send="true" width="450" show_faces="true" fon… ✉

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 element to incorporate flash media in开发者_高级运维 a Web page, see the FAQ item on valid flash.

Line 37, Column 176: there is no attribute "width"…ww.justvibe.co.uk/" send="true" width="450" show_faces="true" font="arial">

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 element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 37, Column 193: there is no attribute "show_faces"…tvibe.co.uk/" send="true" width="450" show_faces="true" font="arial"> ✉

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 element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 37, Column 205: there is no attribute "font"…tvibe.co.uk/" send="true" width="450" show_faces="true" font="arial"> ✉

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 element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 37, Column 212: element "fb:like" undefined…tvibe.co.uk/" send="true" width="450" show_faces="true" font="arial"> ✉

You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "" element), •by using vendor proprietary extensions such as "" or "" (this is usually fixed by using CSS to achieve the desired effect instead). •by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).


You should add the appropriate namespace attribute for XFBML to the html tag:

xmlns:fb="http://www.facebook.com/2008/fbml"

This is mandatory for IE to work properly with Facebook social plugins.

And if you want to use Open Graph:

xmlns:og="http://opengraph.org/schema/"

The W3C validator will still show errors as it doesn't take the additional namespaces into account.


If you want to pass it that way, you need to output the FBML via JavaScript and wrap things in CDATA:

<script language="javascript" type="text/javascript">
//<![CDATA[
document.write('<fb:like href="http://www.yourdomain.com" layout="button_count" show_faces="false" width="450" action="like" font="arial" colorscheme="light"></fb:like>');
//]]>
</script>


You are using the HTML5 version of the like button with a non-HTML5 doctype. Use the XFBML version with the XML namespace added to your HTML tag instead, or convert your page to HTML5. You'll also need to add type="text/javascript" to the <script> tag.

0

精彩评论

暂无评论...
验证码 换一张
取 消