next message in archive
next message in thread
previous message in archive
previous message in thread
Index of Subjects
Index of Subjects > > We can indeed. In my view its also a good thing (where possible) to lead > by example (for our users and IPs) and employ coding that adheres to > current > international standards. Exactly, if it doesn't have a DOCTYPE, and it doesn't pass http://validator.w3.org/ then its not html. The target browser should be something that displays HTML 4.01 or XHTML 1.0. (or rather the target should be to have a page that passes that validation, with one of the current w3c recommendations) XHTML relies on HTML 4.01 for definitions of tags, but is more picky about what is required. While we dont need to make everything (or anything) XHTML now (since nothing supports it), we should make out HTML forwards comparable with something that will strictly parse XHTML. So (from http://www.w3.org/TR/xhtml1/) the following attached guidelines should be followed Im sure Im quoting someone here, but "well performed crap is still crap" and I was reminded of this a few weeks ago at a music recital... It is possible to produce technically valid html which is useless. 'Usefulness' is both a factor of content and design (and design is not just the coolness factor, but the ability to find information - and these leverage on each other). The pre redesign site was not technically valid (no DOCTYPES anywhere, and other errors). The content itself is/was of questionable value (the index is mainly CCN sites - I cant see any real value of this outside of CCN administration - since it (the index) is nowhere near the 'critical mass' of sites its not a useful repository of sites. To consumers of information (including most of out members/users while not in "philosophical attachment" mode) the location of a website is irrelevant.) The design is pretty basic (in a good way), but the pages are very long (lots of <p>'s in there?)... And there were inconsistency in the page design between sections. (or more specifically, there were inconsistencies in the implementation of the design...) Hopefully utilization of the templates will clear up some of these (but not the question of the content value).. But hopefully the redesign will attract other volunteers, and (my) SQL autoindex thinger will have some work done on it, so we can significantly increase the number of indexers (in an effort to reach that 'critical mass'). Then well be getting somewhere Anyway, on to that w3c recommendations 4. Differences with HTML 4 Due to the fact that XHTML is an XML application, certain practices that were perfectly legal in SGML-based HTML 4 [HTML] must be changed. 4.1 Documents must be well-formed Well-formedness is a new concept introduced by [XML]. Essentially this means that all elements must either have closing tags or be written in a special form (as described below), and that all the elements must nest. Although overlapping is illegal in SGML, it was widely tolerated in existing browsers. CORRECT: nested elements. <p>here is an emphasized <em>paragraph</em>.</p> INCORRECT: overlapping elements <p>here is an emphasized <em>paragraph.</p></em> 4.2 Element and attribute names must be in lower case XHTML documents must use lower case for all HTML element and attribute names. This difference is necessary because XML is case-sensitive e.g. <li> and <LI> are different tags. 4.3 For non-empty elements, end tags are required In SGML-based HTML 4 certain elements were permitted to omit the end tag; with the elements that followed implying closure. This omission is not permitted in XML-based XHTML. All elements other than those declared in the DTD as EMPTY must have an end tag. CORRECT: terminated elements <p>here is a paragraph.</p><p>here is another paragraph.</p> INCORRECT: unterminated elements <p>here is a paragraph.<p>here is another paragraph. 4.4 Attribute values must always be quoted All attribute values must be quoted, even those which appear to be numeric. CORRECT: quoted attribute values <table rows="3"> INCORRECT: unquoted attribute values <table rows=3> 4.5 Attribute Minimization XML does not support attribute minimization. Attribute-value pairs must be written in full. Attribute names such as compact and checked cannot occur in elements without their value being specified. CORRECT: unminimized attributes <dl compact="compact"> INCORRECT: minimized attributes <dl compact> 4.6 Empty Elements Empty elements must either have an end tag or the start tag must end with />. For instance, <br/> or <hr></hr>. See HTML Compatibility Guidelines for information on ways to ensure this is backward compatible with HTML 4 user agents. CORRECT: terminated empty tags <br/><hr/> INCORRECT: unterminated empty tags <br><hr> 4.7 Whitespace handling in attribute values In attribute values, user agents will strip leading and trailing whitespace from attribute values and map sequences of one or more whitespace characters (including line breaks) to a single inter-word space (an ASCII space character for western scripts). See Section 3.3.3 of [XML]. 4.8 Script and Style elements In XHTML, the script and style elements are declared as having #PCDATA content. As a result, < and & will be treated as the start of markup, and entities such as < and & will be recognized as entity references by the XML processor to < and & respectively. Wrapping the content of the script or style element within a CDATA marked section avoids the expansion of these entities. <script> <![CDATA[ ... unescaped script content ... ]]> </script> CDATA sections are recognized by the XML processor and appear as nodes in the Document Object Model, see Section 1.3 of the DOM Level 1 Recommendation [DOM]. An alternative is to use external script and style documents. 4.9 SGML exclusions SGML gives the writer of a DTD the ability to exclude specific elements from being contained within an element. Such prohibitions (called "exclusions") are not possible in XML. For example, the HTML 4 Strict DTD forbids the nesting of an 'a' element within another 'a' element to any descendant depth. It is not possible to spell out such prohibitions in XML. Even though these prohibitions cannot be defined in the DTD, certain elem