Warning:
This wiki has been archived and is now read-only.

SequencingOfElementsInHead

From HTML WG Wiki
Jump to: navigation, search

Sequencing of elements in <head>

State: NEW ISSUE

Currently the use of <meta> with a charset attribute and <base> element are restricted as follows:

  • "The charset attribute and its value must be contained completely in the first 512 bytes of the file."
  • The <base> element can only occur "In a head element, after the meta element with the charset attribute, if any, but before any other elements".

Proposal: remove the restrictions on the sequencing on these elements and replace them with the current restriction in HTML4, saying that the <base> must occur "before any element that refers to an external source". Keep the requirements that there should be only one of each, that they should be placed in <head> and that the charset attr must be contaiend within the first 512 bytes of the file.

Arguments

  • Pro: The current restrictions represent uneccesary complications in the spec.
  • Pro: They introduce unnecessary error situations in conformance checkers.
  • Pro: They are illogical in the sense that authors won't intuitively understand why they must be there. Concequently they are more difficult to remember. Things that fit into logical frameworks are more easily remembered than arbitrary rules.
  • Con: Removing these restrictions makes it harder to check documents by means of syntax checking only. The proposed restriction is harder to express by means of formal syntax and conformance checkers will have to check the 512 byte requirement separately.

Research

  • It is unlikely that this modification will break with existing web content because it is a minor change that is closer to the existing HTML4 specification than the current spec.
  • Graceful degradation could be a problem with older browsers that don't implement character sniffing. However, it has been tested with newer versions however using this Graceful degration test. A successful test should come up with "HEAD test ÆØÅ" in the title and an alert saying "Hello from subdir_a".

E-mails

(Most of these e-mails relate to a more radical suggestion that was abandoned because of problems with graceful degradation.)