Web Design - Publish.com
Publish.com Ziff-Davis Enterprise  
SEARCH · ONLINE MEDIA · MOBILE · WEB DESIGN · GRAPHICS TOOLS · PRINTING · PHOTO · TIPS · OPINIONS
Home arrow Web Design arrow HTML (and XHTML) standards compliance
HTML (and XHTML) standards compliance
By Todd Stauffer

Rate This Article:
Add This Article To:
Staying compliant with HTML standards will let you reach the broadest audience possible. Here we offer some tips and tools that will help you validate your HTML code.

There was a time when building Web pages that were compliant with a dominant Web browser's engine—first Netscape and later Internet Explorer—was good enough for most Web sites' needs. That time is quickly passing, however, as compliance with established standards has become an important issue for most Web developers. There are three good reasons for that:

1. Internet Explorer is no longer the only—or even primary—method by which everyone accesses the Web. IE is certainly still huge among the options that many users have, but there are other browsers that have gained an audience in recent months and users, largely due to the prevalence of open source projects and proponents. Browsers that may be visiting your sites include Mozilla (the open source version of the Netscape project), Chimera, Opera, OmniWeb, Konquerer and Apple's Safari, among many others. In order to render optimally in all those browsers, it's important to stick close to the standards.

2. Web browsers running on desktop and laptop computers aren't the only devices accessing the Internet anymore. These days you've got tons of different devices and applications—from mobile phones to PDAs to accessible browsers for the physically challenged—all with different requirements and limits. The closer you are to HTML standards, the better off users of those browsers will be.

3. HTML has become XHTML. XHTML is essentially a recast of the HTML language in something that's XML-compliant, making it a more universally understood and accepted markup language. But, moving from HTML to XHTML has created its own issues, as XHTML is stricter about certain constructs that HTML allows (for instance, XHTML doesn't allow "empty" tags, so the horizontal rule <HR> tag in HTML should be <hr /> in XHTML) and it's a bit less lax about the syntax.

Thanks to these three factors, a number of things have happened to what's considered "standard" HTML. First, browser-specific commands are strongly discouraged. While IE still has some, they aren't as prevalent as they were during the browser wars between Netscape and Microsoft. Still, they should be rooted out. Second, older HTML codes for specific the look of the text as it's rendered—the FONT, FONT SIZE and CENTER tags, to name a few—are discouraged. Instead, XHTML now requires that appearance controls be left to CSS style sheets and the STYLE element. And, finally, XHTML should always be "well-formed" code, complying with the syntax standards of XML.

The easiest way to build compliant pages is to check your graphical Web development tools for their compliance with at least the XHTML 1.0 Transitional standard. If you code by hand, check out http://www.w3.org/MarkUp/ to learn more about the exact standards from the World Wide Web Consortium (W3C), the official standards body for the Web. Currently, XHTML Transitional compliance is acceptable, although, ideally, new pages can be designed as XHTML Strict, particularly if you don't have reason to believe that older browsers will be accessing your pages frequently.

If you've got pages that you've already created, you should check them for HTML/XHTML compliance. The W3C offers an online validator at http://validator.w3.org/ that you can access to check to see if individual pages are valid by plugging in their URLs and allowing them to be loaded and checked. The W3C also offers http://jigsaw.w3.org/css-validator/ can validate your CSS style sheets.

The Web Design Group (WDG) offers a validator at http://www.htmlhelp.com/tools/validator/ that also offers a batch mode for multiple pages. For a third-party option (which claims improvements over the more "official" options) try ARVal HTML Validator at http://www.dandylife.com/arval/docs/arval.shtml.




Discuss HTML (and XHTML) standards compliance
 
>>> Be the FIRST to comment on this article!
 

 
 
>>> More Web Design Articles          >>> More By Todd Stauffer
 


Buyer's Guide
Explore hundreds of products in our Publish.com Buyer's Guide.
Web design
Content management
Graphics Software
Streaming Media
Video
Digital photography
Stock photography
Web development
View all >

ADVERTISEMENT


FREE ZIFF DAVIS ENTERPRISE ESEMINARS AT ESEMINARSLIVE.COM
  • Dec 10, 4 p.m. ET
    Eliminate the Drawbacks of Traditional Backup/Replication for Linux
    with Michael Krieger. Sponsored by InMage
  • Dec 11, 1 p.m. ET
    Data Modeling and Metadata Management with PowerDesigner
    with Joel Shore. Sponsored by Sybase
  • Dec 12, 12 p.m. ET
    Closing the IT Business Gap: Monitoring the End-User Experience
    with Michael Krieger. Sponsored by Compuware
  • Dec 12, 2 p.m. ET
    Enabling IT Consolidation
    with Michael Krieger. Sponsored by Riverbed & VMWare
  • VTS
    Join us on Dec. 19 for Discovering Value in Stored Data & Reducing Business Risk. Join this interactive day-long event to learn how your enterprise can cost-effectively manage stored data while keeping it secure, compliant and accessible. Disorganized storage can prevent your enterprise from extracting the maximum value from information assets. Learn how to organize enterprise data so vital information assets can help your business thrive. Explore policies, strategies and tactics from creation through deletion. Attend live or on-demand with complimentary registration!
    FEATURED CONTENT
    IT LINK DISCUSSION - MIGRATION
    A Windows Vista® migration introduces new and unique challenges to any IT organization. It's important to understand early on whether your systems, hardware, applications and end users are ready for the transition.
    Join the discussion today!



    .NAME Charging For Whois
    Whois has always been a free service, but the .NAME registry is trying to change that.
    Read More >>

    Sponsored by Ziff Davis Enterprise Group

    NEW FROM ZIFF DAVIS ENTERPRISE


    Delivering the latest technology news & reviews straight to your handheld device

    Now you can get the latest technology news & reviews from the trusted editors of eWEEK.com on your handheld device
    mobile.eWEEK.com

     


    RSS 2.0 Feed


    internet
    rss graphic Publish.com
    rss graphic Google Watch

    Video Interviews


    streaming video
    Designing Apps for Usability
    DevSource interviews usability pundit Dr. Jakob Nielsen on everything from the proper attitude for programmers to the importance of prototyping in design to the reasons why PDF, Flash and local search engines can hurt more than they help.
    ADVERTISEMENT