Every webproject should try to create valid HTML. Zwiki has some issues where non-valid HTML is created.

Zwiki currently has the following open issues on this subject:

Closed issues which are related:


How to check if the HTML is valid?

You can easily check if a page is valid HTML by using http://validator.w3.org/ (example )

Why should I create valid HTML?

Ensuring universal access is probably the most important reason for adhering to the HTML specification. HTML was developed so people using a wide variety of devices could access documents on the Web. Aside from various versions of Netscape Navigator and Internet Explorer for PC, Mac and UNIX platforms, there are text based browsers like Lynx, browsers for handheld PC's, cellular phones, and devices for the visually impaired and disabled. The most effective way to achieve expected results for your documents is to write valid HTML.

Invalid HTML, is a different story. Most browsers will try to interpret invalid HTML, but it is difficult to predict the results. Sometimes it will display correctly; sometimes it wont display at all. And although documents may work on a test browser, there's no way of knowing how it will work on any version of any other browser on any other platform. Short of testing documents on every conceivable device, the only way to ensure documents will be accessible with some consistency is to write valid HTML. In other words, valid HTML gives you the most control over your documents by leaving nothing essential open to interpretation by the browser

Source: http://www.hotmetalpro.com/resources/html/validhtml.htm#interoperability

Valid HTML might also make your site easier to spidering by robots such as Google. Invalid HTML can lead to the TheRobotProblem

Specifying charsets

For more info about specifying charsets see: http://www.htmlhelp.com/tools/validator/charset.html

Here is an example of a valid HTML 4.01 Transitional template:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
   <HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
      <TITLE>My first valid HTML document</TITLE>
   </HEAD>
   <BODY>
      <P>Hello world!
   </BODY>
</HTML>

Here is an example of a valid XHTML 1.0 Transitional template (for use within PageTemplates):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      metal:use-macro="here/main_template/macros/master">
<head>
    <meta http-equiv="Content-Type"
          content="text/html;charset=iso-8859-1" />
</head>
<body>
  ... some lines of text ... <br />
</body>
</html>

For more information on specifying DOCTYPE's see:

Common things you should change

WRONGGOOD
<br><br />
<form method="POST" ...><form method="post" ...>
......

PageMaintainers: PieterB, ... (help wanted)


comments:

Statistics on valid html and how to parse invalid html -- Wed, 27 Oct 2004 00:11:45 -0700 reply
In 2001 I wrote a thesis named "How to cope with incorrect HTML", which is available at http://elsewhat.com/thesis . The main focus is with the HTML standard and how a browser can parse valid and invalid HTML. However, perhaps the most interesting part of this thesis is a validation effort of 2.5 million HTML pages (XHTML was not considered at the time) taken from http://dmoz.org. It showed that only 0.71% of all HTML pages were valid, and describes in some details the different errors the pages had. You can jump directly this chapter via http://elsewhat.com/thesis/pages/?nr=81 , which shows each page of the thesis as a separate image.

DagfinnParnas?