spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / new / xhtml

Following the XHTML Path

Biz Resources
ERP Software
Computer Hardware
Data Backup Services
Developer News
SaaS Tool Offers Custom Database Development
Microsoft’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear
The W3C laid out the XHTML path by releasing the XHTML 1.0 (Extensible HTML) specs on January 26, 2000 with full support of all of HTML 4.0 features as well as compatibility with XML for future development. You may think of XHTML as the transition from XML (how the data is to be defined) to HTML (how the data will be displayed). For more information about XML, I highly recommend Michael Classen's XML articles on WebReference.

webreference.com/xml/ - Xploring XML on WebReference.com

The main difference between HTML and XHTML is the structure of XHTML. XHTML is a more formalized structure of HTML 4.0 supporting all HTML 4.0 features with complete CSS and DOM support. The formalized style of XHTML coding allows ease of maintenance and future additions to any XHTML Web page or site. Loose and unstructured elements are not allowed in XHTML. For example, in XHTML you must use lower case tags for all HTML attributes and elements:

<p> correct form
<P> - incorrect form

Another example of structured XHTML is unclosed elements. All XHTML elements must be closed out to produce a well-formed document. Well-formed (a term carried over from XML) simply means that all elements are nested and closed properly and follow strict guidelines in XML and XHTML. A good example is the paragraph element:

<p>your paragraph</p> - correct form
<p>your paragraph - incorrect form missing closing element.

JavaScript and CSS are not allowed in XHTML documents. The XML parser will report a error if the XHTML page contains internal CSS or JavaScript coding. Any CSS or JavaScript can be accessed through a external file. Relocate the CSS and/or JavaScript to a separate file and cross link the XHTML page to it. Web page developers will find this actually helps to modularize the components of a Web site. Anytime you need to access CSS or JavaScript, simply link to the appropriate file from your XHTML code. Most developers find this style of Web site design to be easier to maintain and modify. Modularization of XHTML is one of the future features currently under review by W3C. For further information and specifications about XHTML 1.0, please refer to the following XHTML web sites:

webreference.com/xml/column6/ - XHTML vs HTML
www.w3.org/TR/xhtml1/ - XHTML 1.0 specifications
www.w3.org/TR/xhtml11/ - XHTML specifications under review

Now is the time to double check your HTML editor. Most current HTML editors have support for XHTML. Be sure to get the latest updates and version of your HTML editor. If your editor does support XHTML, then be certain to review all documentation and suggestions on the XHTML functions. Practice converting your Web pages from HTML to XHTML. Be sure to check your XHTML by submitting your Web page to the W3C XHTML Validator. (validator.w3.org) The validator will verify that your Web page follows all XHTML guidelines and will parse correctly.

Next: More on XHTML

This article originally appeared in the June 29, 2000 edition of the WebReference Update Newsletter.


http://www.internet.com

Comments are welcome
Written by David Jenkins and

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
How to Create an Ajax Autocomplete Text Field: Part 6 · Software Engineering for Ajax · Perl Pragma Primer
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Using File Virtualization for Disaster Recovery · VoIP Security: SIP—Versatile but Vulnerable · Around the World in 80 Nodes

Revised: June 30, 2000

URL: http://webreference.com/new/road2xhtml.html