W3C says “there is no attribute ‘property’”

The Facebook / Open Graph meta property attribute is not part of the HTML5 standard, so the W3C Markup Validator is correct in throwing up an error. In practice though, this incorrect attribute is harmless — social sites look for it and don’t care if it’s part of the standard or not. If you want to fix the W3C validator error, you’ll have to change the DOCTYPE of your website to XHTML+RDFa (an example follows). The DOCTYPE definition is usually located in the header.php file of your theme.

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

Leave a Review