user847495
user847495

Reputation: 10161

How come adding this to the doctype messes up my meta tags?

When I ran my website through facebook lint (http://developers.facebook.com/tools/debug) ...everything was fine.

This was my doctype before:

<!DOCTYPE html>

Then, I added the "xmlns" to my doctype.

<!DOCTYPE html  xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">

I ran it through Facebook Lint again...and facebook could not scan any of my meta tags anymore. Why? It said all the properties are missing.

Upvotes: 0

Views: 164

Answers (2)

ShawnDaGeek
ShawnDaGeek

Reputation: 4150

Add namespace to the html tag instead of the doctype.

    <!DOCTYPE HTML> 
        <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#">
<head>
<title></title>
</head>
</body>
</body>
</html>

More about doctype and namespace usage here http://www.w3.org/QA/2002/04/valid-dtd-list.html

Upvotes: 0

Yuliy
Yuliy

Reputation: 17718

The xmlns properties go onto the <html> tag, not the doctype.

Upvotes: 2

Related Questions