Meta tag 'there is no attribute "property" ' and other attribute error:
The attributes you mention are simply not part of XHTML 1.0 Transitional, so a validator has to report them as errors. Just remember that the concept of error is relative here: it means that the document does not conform to the document type definition it purports to comply with (by referring to a document type definition by the doctype
declaration).
The property
attribute is not part of HTML5 CR either, but validators like http://validator.nu use a “schema for HTML5 + SVG 1.1 + MathML 3.0 + RDFa Lite 1.1”, where the RDFa part allows property
.
If your markup is a mix of XHTML 1.0 Transitional and HTML5, for example, just relax. The mix works in browsers and other relevant software, except for validators, which need to be picky. Just use a doctype
that best corresponds to the markup you have, and manually check the error messages. If you get just 3 error messages when using XHTML 1.0 Transitional, keep using it, until you get fewer errors when checking against HTML5.
Snippet
Updated on June 04, 2022Comments
-
Snippet almost 2 years
I tried to validate my site and i get this following error
there is no attribute "property"
<meta property="og:title" content="Free Sms" />
there is no attribute "allowTransparency"
…w:hidden; width:450px; height:21px;" allowTransparency="true">Facebook</iframe>
there is no attribute "placeholder"
…"search" type="text" placeholder="SEARCH" value="" class="searchInp …
First my code has this and i get 13 errors.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Changing the code to this reduce my error. but I get the 3 errors.Why? Any guide how to fix this?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
Complete
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml" xml:lang="en" lang="en"> <head> <title>Welcome to mysite</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta name="keywords" content="Social, Programming" /> <meta name="description" content="Share Ideas and become the best" /> <meta http-equiv="Content-Language" content="en" /> <meta name="robots" content="*" /> <meta name="document-type" content="text" /> <meta name="googlebot" content="NOODP" /> <meta name="slurp" content="NOYDIR" /> <meta name="msnbot" content="NOODP" /> <meta name="Generator" content="snippet" /> <meta property="og:title" content="Welcome to mysite" /> <meta property="og:type" content="website" /> <meta property="og:url" content="" /> <meta property="og:description" content="Share Ideas and become the best" /> <meta property="fb:app_id" content="" /> <meta property="og:image" content="http://mysite.com/images/fbicon.png" />
-
Snippet over 10 yearswhen i use doctype html5 i got lot of errors most of it are obsolete property.is it ok also to mixed it up? what happens to the tags or property that are obsolete in html5?
-
Jukka K. Korpela over 10 years@Snippet, nothing happens to tags or attributes that are declared “obsolete” in HTML5. It’s just words, and HTML5 requires browsers to continue supporting “obsolete” features, and in any case they do so.
-
Snippet over 10 yearsi see.thanks. How about my meta tags. when i change doctype to html5 some of my meta tags gat error like Bad value msnbot for attribute name on element meta: Keyword msnbot is not registered
-
Jukka K. Korpela over 10 years@Snippet, similarly, it’s just about HTML5 requirements on documents (authors); they do not affect browsers or robots. The
meta
tags have their effects (usually none – mostmeta
tags are really write-only) quite independently of HTML5 restrictions on thename
andhttp-equiv
attributes. -
Snippet over 10 yearsThanks for everything.i haven't change it to html five because of too many errors, using same doctype i have fixed the property error by changing to 'name' only the placeholder is now my problem