W3C home > Mailing lists > Public > www-validator@w3.org > October 2000

Base element

From: Hugo Haas <hugo@w3.org>
Date: Mon, 9 Oct 2000 14:59:25 -0400
To: www-validator@w3.org
Message-ID: <20001009145925.A10406@w3.org>
According to the HTML 4.01 specification[1]:

   When present, the BASE element must appear in the HEAD section of an
   HTML document, before any element that refers to an external source.

So I think that the following document is invalid:

       <TITLE>BASE element</TITLE>
       <LINK type="text/css" rel="stylesheet" href="style.css">
       <BASE href="http://example.org/bar/">
     <P>There is an external source specified <EM>before</EM> the BASE

The HTML validator seems to be pretty happy about it though.

The DTD[2] reads:

  <!--================ Document Head =======================================-->
  <!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
  <!ENTITY % head.content "TITLE & BASE?">
  <!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->

My understanding is that %head.content; must appear before %head.misc;
(well, it's not very clear by reading [3]), which means that it is a
validator problem.

  1. http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#h-12.4
  2. http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd
  3. http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#h-

Hugo Haas - W3C/MIT
mailto:hugo@w3.org - tel:+1-617-452-2092
Received on Monday, 9 October 2000 14:59:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:28 UTC