The Dogma W4 - details and explanation

Ad 1. The code

Documents' codes are mistake-free and valid according to the strict HTML 4.01 or XHTML.

Details: When more document types are permitted by specification, type "Strict" must be used.

Older standards, such as HTML 3.2 and even Transitional and Frameset document types are deprecated. Newer standards have already removed their functionality and their further use inhibits establishing of modern technologies. Relevant language specifications follow:

Details: Document must refer to DTD and must be valid according to this definition.

Used language version specification referring to the DTD is now mandatory. XHTML documents must in addition contain XML declaration. See examples of minimal HTML and XHTML documents.

Details: Code must be mistake-free.

Time, when browsers processed documents containing mistakes, is over. Newer standards are much stricter and do not tolerate them. Mistake-free code is therefore essential. Various software validators can find mistakes, i.e.:

However validation results with such validators may only function as a guideline, not an authoritative affirmation of faultlessness.

The backward compatibility must be respected...

Details: Constructions unknown in former language versions may only be used with respect to backward compatibility.

The document must be usable even in browsers supporting only older language versions (i.e. HTML 3.2). Newer languages' constructions may only be used not to restrict users. XHTML documents will work in older browsers if authors avoid using incompatible instructions.

... and the forward compatible syntax must be preferred.

Details: Tolerated, but not recommended constructions must not be used.

Some language specifications still permit old functionality (tags and attributes). However when new techniques are recommended, they must be obeyed. For example instead of using elements <b>, <big> etc. should authors, according to HTML 4.01 Specification, prefer cascading styles formatting. The W4D Principles do require this.

Details: If alternative syntax is available, authors must prefer that required in newer language versions.

In HTML, tags and attributes are permitted to be written in lower-case, in latter XHTML lower-case is required. The W4D Principles therefore urges authors to write tags and attributes only lower-cased in HTML, although both upper and lower case conform to the HTML specification.

Note: When both single and double quotes are permitted by specification, author should prefer "doubles". That is because some browsers misinterpret commands in single quotes, whereas there is no problem with double quotes. Surely it is browser's fault, but why should we deny any users to access our documents?