Internet Programming UNIT-1 Introduction To XHTML: What You Should Already Know
Internet Programming UNIT-1 Introduction To XHTML: What You Should Already Know
What Is XHTML?
XHTML stands for EXtensible HyperText Markup Language 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 - Why?
XHTML is a combination of HTML and XML (EXtensible Markup Language). XHTML consists of all the elements in HTML 4.01, combined with the strict syntax of XML. Many pages on the internet contain "bad" HTML. The following HTML code will work just fine if you view it in a browser (even if it does NOT follow the HTML rules): <html> <head> <title>This is bad HTML</title> <body> <h1>Bad HTML <p>This is a paragraph </body> XML is a markup language where everything must be marked up correctly, which results in "wellformed" documents. XML is designed to describe data, and HTML is designed to display data.
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
XHTML Syntax
More XHTML Syntax Rules
Attribute names must be in lower case Attribute values must be quoted Attribute minimization is forbidden The XHTML DTD defines mandatory elements
XHTML Doctypes
<!DOCTYPE> Is Mandatory
An XHTML document consists of three main parts:
The basic document structure is: <!DOCTYPE ...> <html> <head> <title>... </title> </head> <body> ... </body> Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
XHTML 1.1
This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
XHTML HowTo
How W3Schools Was Converted To XHTML
W3Schools was converted from HTML to XHTML in December 1999, by Hege Refsnes and Stle Refsnes. To convert a Web site from HTML to XHTML, you should be familiar with the XHTML syntax rules described in the previous chapters. The following steps were executed (in the order listed below):
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
XHTML Validation
An XHTML document can be validated with W3C's validator.
XHTML 1.1
This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Internet Programming UNIT-1 Validate Your XHTML With The W3C Validator
Input a web address in the box below:
XHTML Modularization
The XHTML modularization-model defines the modules of XHTML.
Choose the elements to be supported by a device Simplify XHTML for small devices Extend XHTML for complex applications by adding new XML functionality (like MathML, SVG, Voice and Multimedia) Define XHTML profiles like XHTML Basic (a subset of XHTML for mobile devices)
XHTML Modules
W3C has split the definition of XHTML into 28 modules: Module name Applet Module Base Module Basic Forms Module Basic Tables Module Description Defines the deprecated* applet element Defines the base element Defines the basic forms elements Defines the basic table elements Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi
Prepared By: Deepak Kumar Prajapat Lecturer: CS/IT Department VCET, Bundi