1 XHTML is a more formal, stricter version of HTML. XHTML is defined by an XML dtd which makes it much easier to handle.
2. * XHTML stands for eXtensible Hyper Text Markup Language. * It is aimed to replace HTML. * It is almost identical to HTML 4.01 * It is the reformulation of HTML 4.01 as an application of XML. * It is a stricter, tidier version of HTML. XHTML 1.0 is the next level of coding as specified by the W3C. XHTML is a transition / combination of HTML and XML. To change from HTML to XHTML requires just a few changes in your coding styles. The main page to check out is CONVERTING but all the others provide valuable information about this coding technique as well. XHTML provides the framework for future extensions of HTML and aims to replace HTML in the future. Some resources refer to XHTML as HTML5. XHTML 1.0 became an official W3C recommendation on January 26, 2000. A W3C recommendation means that the specification is stable, that it has been reviewed by the W3C membership, and that the specification is now a Web standard. XHTML 1.0 is the first step toward a modular and extensible web environment based on XML (eXtensible Markup Language). It provides the bridge for web designers to use a future based coding and still be able to maintain compatibility with today's browsers. XHTML is a stricter and cleaner version of HTML.
3. * XHTML stands for EXtensible HyperText Markup Language * XHTML is aimed to replace HTML * XHTML is almost identical to HTML 4.01 * XHTML is a stricter and cleaner version of HTML * XHTML is HTML defined as an XML application * XHTML is a W3C Recommendation XHTML is a combination of HTML and XML (EXtensible Markup Language). XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML. Advantages of using XHTML instead of HTML 1. Documents can be validated much easier 2. Documents can be transformed via tools like XSLT into other documents for consumption by devices like handhelds 3. Fragments of documents can be retrieved faster 4. Text can be stored more effieciently in object oriented databases
Answer4: The great thing about XHTML, though, is that it is almost the same as HTML
An XHTML document is validated against a Document Type Definition. Validate XHTML With A DTD
An XHTML document is validated against a Document Type Definition (DTD). Before an XHTML file can be properly validated, a correct DTD must be added as the first line of the file.
The Strict DTD includes elements and attributes that have not been deprecated or do not appear in framesets:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
The Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
The Frameset DTD includes everything in the transitional DTD plus frames as well:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
This is a simple XHTML document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>simple document</title> </head> <body> <p>a simple paragraph</p> </body> </html>
Ampersands in hrefs must convert "&" to "&" in the URI <a href="http://www.phonelists.com/cgi-bin/Handler.pl?ListID=Test&Password=test&action=View">Sample List</a>
becomes <a href="http://www.phonelists.com/cgi-bin/Handler.pl?ListID=Test&Password=test&action=View">Sample List</a>
# The attribute "name" becomes "id" when used for a locator inside a document
For example, to reference a section within a document with a URI, we usually do something like "<a href="favoriteA
The XHTML standard defines three Document Type Definitions.
The most common is the XHTML Transitional.
The <!DOCTYPE> Is Mandatory An XHTML document consists of three main parts: * the DOCTYPE * the Head * the Body
The basic document structure is: <!DOCTYPE ...> <html> <head> <title>... </title> </head> <body> ... </body> </html>
The DOCTYPE declaration should always be the first line in an XHTML document.
An XHTML Example This is a simple (minimal) XHTML document: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>simple document</title> </head> <body> <p>a simple paragraph</p> </body> </html>
The DOCTYPE declaration defines the document type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
The rest of the document looks like HTML: <html> <head> <title>simple document</title> </head> <body> <p>a simple paragraph</p> </body> </html>
The 3 Document Type Definitions * DTD specifies the syntax of a web page in SGML. * DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations. * XHTML is specified in an SGML document type definition or 'DTD'. * An XHTML DTD describes in precise, computer-readable language, the allowed syntax and grammar of XHTML markup.
There are currently 3 XHTML document types: * STRICT * TRANSITIONAL * FRAMESET
XHTML 1.0 specifies three XML document types that correspond to three DTDs: Strict, Transitional, and Frameset.<
"Hello World" Web page code looks like this:
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Hello World</title> </head> <body> <p>My first Web page.</p> </body> </html> </p>
For reasons on internationalisation XML elements are case sensitive. A choice had to be made, and lowercase won on the day.
Tags may not overlap
This is <em> emphasized text and <b>bold </em>text</b>
becomes This is <em>emphasized text </em> is <b>bold text</b>
Only certain tags may nest inside other tags
Looking at the dtd for xhtml, the definition of the "ol" element is:
<!ELEMENT ol (li)+> <!ATTLIST ol %attrs; type %OLStyle; #IMPLIED compact (compact) #IMPLIED start %Number; #IMPLIED >
This implies that an order list, "ol", element may not contain paragraph tags or body text, just list items. <ol>
These are some of my favorite animals: <li>octopus</li> <li>shrew</li> <li>lemur</li> and my most favorite <li>meerkats</li> </ol>
becomes <p>These are some of my favorite animals:</p> <ol> <li>octopus</li> <li>shrew</li> <li>lemur</li> <li>meerkats</li> </ol>
A Great Tutorials Portal
Aquarian Infotech System
Copyright © 2008 interviewmaterial.com. All rights reserved.