Tutorial by Examples

XHTML Relation to HTML XHTML is simply the serialized version of HTML. XHTML was originally intended to clean up HTML markup to better improve standards support. Unfortunately the W3C's work on XHTML 2.0 was not intuitive and detracted from where the industry as a whole was headed with HTML5. XHTML...
The following is a full example of using XHTML with JavaScript served by PHP as a single-file. <?php if (isset($_SERVER['HTTP_ACCEPT']) && stristr($_SERVER['HTTP_ACCEPT'],'application/xhtml+xml')) { // Client header isset` and explicitly declares XHTML parser support. header('Conte...
HTML5 defines some HTML attributes as boolean; a boolean can only be true or false. The specification simply states that the presence of a boolean attribute implies that the attribute is set to true. In example using a disabled attribute in the following example disables the button input element: &...
Using XHTML you should avoid methods such as document.write and innerHTML as they treat XML as text and do not properly serialize code; an id attribute in HTML is essentially dumped in to the DOM and the id attribute is not serialized which means when trying to reference to it with something such as...

Page 1 of 1