160 likes | 292 Views
CITA 330 Section 3. XHTML. Introduction to XHTML. Closely resembles HTML 4.01 Designed: As a replacement for HTML General purpose, compact language for Web design. Introduction to XHTML. The W3C approved XHTML 1.0 in January 2000. First major change to HTML since HTML 4.0 in 1997.
E N D
CITA 330 Section 3 XHTML
Introduction to XHTML • Closely resembles HTML 4.01 • Designed: • As a replacement for HTML • General purpose, compact language for Web design
Introduction to XHTML • The W3C approved XHTML 1.0 in January 2000. • First major change to HTML since HTML 4.0 in 1997. • Three more modular XHTML Recommendations have been approved. • Developers can tailor their content to various devices.
Introduction to XHTML • Advantages of XHTML • XHTML resembles HTML • Its coding must meet tougher XML-compliant standards • XHTML is extensible • It is portable and modular • XHTML is backward and future compliant
XHTML Variants and DTDs • Variants contain its own family of document types • Strict • Transitional • Frameset • Variant type must be declared the DOCTYPE declaration
XHTML Variants and DTDs • The XHTML 1.0 Strict Variant • Designs clean structural markup document • Uses W3C’s Cascading Style Sheet language • Strict DTD contains elements, attributes and components that do not appear in framesets
XHTML Variants and DTDs • The XHTML 1.0 Transitional Variant • Commonly used for developing Web pages for the general public to access • Transitional DTD • Includes all in the Strict DTD • Includes deprecated elements and attributes • Include both the <lang> and <xml:lang> elements
XHTML Variants and DTDs • The XHTML 1.0 Frameset Variant • Partitions the browser window using frames • Frameset DTD • Includes all in the Transitional DTD and plus frames • Utilizes Frameset element instead of body element
The Difference between XHTML Syntax and HTML Syntax • XHTML is an application of XML • Requires clean and structured syntax • All elements are nested in the root HTML element • Element names must be lower case • Element must have start and end tags
The Prolog and Basic Elements • Prolog • XML declaration • Document Type declaration • DOCTYPE definition is mandatory
The Prolog and Basic Elements • Well-formedness • All elements must be nested in root HTML element • Default namespace (required) • Subelement tags must be in pairs • Elements properly nested in their respective parent element
The Prolog and Basic Elements • Element and attribute names must be lowercase • XHTML elements must be properly closed • Requires start and end tags • XHTML does not allow stand-alone attributes
XHTML Utilities and Services Provided by W3C • Converting Web Sites to XHTML • Converting manually is not recommended • W3C’s HTML Validation Service • Free service at W3C’s web site • Choose validation parameters: encoding scheme and document type specification
XHTML Utilities and Services Provided by W3C • HTML Tidy • Free downloadable utility for editing HTML • Mistakes are fixed automatically • Converts HTML content into well-formed XML for delivery as XHTML • Available for most platforms
XHTML Utilities and Services Provided by W3C • Amaya: W3C’s Editor/Browser • Multipurpose active client • Retrieves documents from the web and presents them to the client • Provides an authoring tool to edit exiting documents and to create new ones • Publishes documents on remote Web servers • Is both a browser and authoring tool