i am developing a website and i got a requirement for adding the 开发者_C百科Xhtml and Css verification buttons from W3C site.i am trying from last 3 days but didn't got any solution that how to add it.can anyone help me out?
The solution is on the w3c website. Add this to your page:
<p>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
</p>
There is a similar block for the CSS validator. You should probably make sure your page actually is valid XHTML or CSS, of course.
After you validate your XHTML (and pass validation, of course), you'll be given the markup to include the "valid" icons. You can do the same thing for you CSS, too.
For CSS Validator you can use the following site
http://jigsaw.w3.org/css-validator/validator/
To validate a site you can set the link of the button to
http://jigsaw.w3.org/css-validator/validator?uri=sitename&profile=css21&usermedium=all&warning=1&lang=en
where you set the site name in the uri
query string parameter.
For XHTML you can use the following link
http://validator.w3.org/check?uri=sitename&charset=%28detect+automatically%29&doctype=Inline&group=0
Once your site passes, you'll see the buttons. You can see what the button code looks like here http://validator.w3.org/ and using the url www.w3c.org
精彩评论