What is difference between XHTML and HTML? [closed]

XHTML is not so much different from HTML 4.01 standard. The major differences are: XHTML elements must be properly nested. XHTML elements must always be closed. XHTML elements must be in lowercase. XHTML documents must have one root element. Basically, XHTML is HTML (all the html tags are found in XHTML) that follows the rules … Read more

Facebook open graph meta tags & valid html [duplicate]

Don’t forget that they also want you to declare some schemas to the html tag – specifically the open graph one via xmlns:og=”http://opengraphprotocol.org/schema/. OG is based on RDFa which adds the additional attributes to the meta tags. Once you’re done with that, be sure to add your fb:like – <fb:like href=”http://developers.facebook.com/” width=”450″ height=”80″/> – the … Read more

Do you know a HTML-Snippet Validator?

You can actually use the W3C validator to check a snippet. Choose the ‘Validate by Direct Input’ tab and select More Options. In there there is a radio button to ‘Validate HTML fragment’. http://validator.w3.org/#validate_by_input+with_options It will wrap your page in valid html so the errors which you see are only due to your snippet.

Why do we need disabled=”disabled”?

The officially correct xhtml syntax is disabled=”disabled”. The reason for this is that xhtml is an XML syntax, and XML requires that attributes have values. The xhtml specs also explicitly specify that the value should be “disabled”. The reason for the choice of this value over any other possible value was fairly arbitrary; they simply … Read more

jQuery Selector + SVG Incompatible?

This happens because SVG DOM spec differs a lot from HTML DOM. SVG DOM is a different dialect, and some properties have same names but mean different things. For example, to get the className of an svg element, you use: svg.className.baseVal The properites affected by this are className is SVGAnimatedString height,width, x, y, offsetWidth, offsetHeight … Read more