You are here:  Home > Why use XHTML? Last updated 04 Oct 2013   

Why use XHTML?

In the early 2000's XHTML was seen as a means of producing a standard web site layout which was reasonably consistent across different web browsers. It was an attempt by the W3C (World Wide Web Consortium) to bring the discipline of XML (eXtensible Markup Language) to web design using HTML4 (Hyper-Text Markup Language version 4). As is the case with most standards there are usually adherents and detractors, and XHTML was no different. The web browser developers decided to put their efforts into a new standard, HTML5.

The key criticism is that XHTML is usually served to web browsers as content type: text/html whereas it strictly requires to be served as content-type: application/xhtml+xml. Web browsers have HTML parsers which take the input data stream and turn it into something which can be rendered on the PC screen, but not every one has an XML parser to do the same job. In practice, if you keep your XHTML data stream simple and follow the W3C rules, see this link (Appendix C) and this link (includes a nice example of valid XHTML), web browsers should render the stream without a problem.

The AllIncontext web site is kept simple by only serving textual data, our css stylesheet is read from an external file, and we don't use script (which if used should also be in external files). We do this to keep you safe, and to ensure that potential conflicts between XHTML and HTML are minimized. You can use the W3C validator buttons at the bottom of each web page to test the validity of the XHTML and the CSS used. If you find a problem, let us know so that we can fix it. The principle advantage of XML is that it can be read and processed by both humans and computers. For more detail on XHTML and HTML differences see this link.

AllIncontext Limited is registered in England, No 04624520. Registered office address: 12-14 High Street, Petersfield, Hampshire, GU32 3JG.

Valid XHTML 1.0 Strict   Valid CSS!