XHTML stands for Extensible Hyper Text Mark up Language.
XHTML is almost identical to HTML 4.01 with only few differences.
XHTML documents are XML conforming as they are readily viewed, edited, and validated with standard XML tools. So, developers who migrate their content to XHTML 1.0 get the benefits.
XHTML syntax is very similar to HTML syntax and almost all the valid HTML elements are valid in XHTML as well.
Rules and Syntax of XHTML
- Documents must be well-formed. …
- All element and attribute names must be lower case. …
- Non-empty elements must have a closing tag. …
- Attribute values must always be quoted. …
- Attribute Minimization is not allowed. …
- Empty Elements must also be closed. …
- Whitespace in attribute values.
All XHTML documents must have a DOCTYPE declaration at the start.
There are three types of Document Type Definitions (DTDs). The easiest and most commonly used is the XHTML Transitional document.
A list of the XHTML Doctypes:
Valid XHTML Document Conformance
The XHTML 1.1 provides a definition of strictly conforming XHTML documents which MUST meet all the following criteria −
- The document MUST conform to the constraints expressed in XHTML 1.1 Document Type Definition.
- The root element of the document MUST be <html>.
- The root element of the document MUST designate the XHTML namespace using the xmlns attribute.
- The root element MAY also contain a schema location attribute as defined in the XML Schema.
There MUST be a DOCTYPE declaration in the document prior to the root element. If it is present, the public identifier included in the DOCTYPE declaration MUST refer the DTD found in XHTML 1.1 Document Type Definition.
Basic Structure of XHTML:
A basic XHTML document consists of the following main parts:
- The DOCTYPE (DTD)
- html document root
- xmlns attribute for the html element
- head element with a child title element
- body element
Basic XHTML Document Structure:
Tririd Technologies Pvt Ltd is Best Software Company in Ahmedabad, India.
Tririd develops kind of websites using HTML5, CSS3,Word press, PHP etc. We understand the requirements of client and design the website according to SEO. This will help them to get top position in Google.
For more information about TRIRID.
Call us @ 8980010210
Visit us @ http://www.tririd.com/