Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.8k views
in Q2A Core by

I'm currently using this doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

but i have 4 errors on w3c validation regarding facebook connect button

I tried to change the doctype to: 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

but this generates more errors.

What doctype should i use to validate my html?

http://validator.w3.org/check?uri=http://kermit.ro

1 Answer

+1 vote
by
edited by

Yes, the errors you get when you switch to XHTML are caused by Q2A's HTML tags being generated in upper-case, which is not acceptable XHTML.

The first two errors you are getting now could be solved by putting the required type="text/javascript" attributes on the two <script> tags introduced by the Facebook login plugin. You can change this inside the plugin PHP.
 
The next two are trickier. If you try to tell the validator about the FB namespace you will get another error. The best solution might be to get rid of this (again in the plugin):
<fb:login-button perms="email,user_about_me,user_location,user_website"></fb:login-button>
and replace it with this:
 
<script type="text/javascript">document.write('&lt;fb:login-button perms="email,user_about_me,user_location,user_website"&gt;&lt;/fb:login-button&gt;');
</script>
 
Since the FB connect code needs javascript to run, you're not losing anything by doing this.
 
Alternatively, if you are using jQuery with your theme (or in future using Q2A 1.4, which provides jQuery), you might find this sort of solution appropriate:
 

 

by
Tks dofmike

My website has too many errors w3c
validator.w3.org/check?uri=http%3A%2F%2Fcucre.vn&charset=%28detect+automatically%29&doctype=Inline&group=0
http://cucre.vn

hope you help me
...