" Table less web design and unobtrusive javascript"

Lastest News

iPlayer Script

Jun-27-2010

Seasons Greetings

Dec-22-2009

Latest Blogs

HTML 5

Jun-27-2010

Where does XHTML come from?

Dec-04-2009

Latest FAQs

Where does XHTML come from?

XHTML programming - the basics

A lot of web designers still don't realize how important adequate HTML coding is and most web browsers are able to handle these inadequacies. The growing number of web-enabled mobile devises though is unable to handle these inadequately coded web sites. XHTML, a new technology helps to promote clean and compliant code for web sites to run on all the standard browsers as well as web-enabled mobile devices.

Where does XHTML come from?

XHTML is basically a combination of HTML and XML, as the name implies. XHTML includes all the elements of HTML combined with XML syntax represented in a set of existing and future modules and document types. Unlike HTML, the documents need to be well structured, they actually need to be processed with basic XML tools. A well known professor of computer science once said that XHTML is "very picky" and distinguishes itself from HTML by the much stricter syntax. The WC3 (World Wide Web Consortium) recommended the first version, XHTML 1.0, on January 26, 2000, followed the recommendation of XHTML 1.1 on May 31, 2001. As of today, XHTML 5.0 is in development under the HTML 5.0 specification.

XHTML Syntax

Writing XHTML code is essentially very similar to writing HTML as it is merely an extended version of HTML. The major difference is that XHTML is far more structured and more strict than its predecessor. There are some important rules that need to be followed though:

  • All elements must be nested correctly
  • All elements must be closed out correctly
  • All tag names must be entered in lower case characters
  • All attribute names must be entered in lower case characters
  • All attribute values must be quoted correctly
  • The name attribute is to be replaced by the id attribute
  • All images and graphics must have alt (alternate) text
  • All XHTML documents require a DOCTYPE declaration along with an HTML head and body header elements
  • The title element must be included in the head element

© 2004 - 2010 net4visions.com. All rights reserved. Phone: +1 (858) 736-9253

Valid XHTML 1.0 Strict