- From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
- Date: Tue, 26 Oct 2004 12:00:48 +1000
- To: Wesley <shnitzeldoodle91@netscape.net>
- CC: www-validator@w3.org
Wesley wrote: > I don't understand why my DOCTYPE won't allow the STYLE and BODY elements, any > ideas? My DOCTYPE is > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> It depends, but the most likely suspect that I can think of is that you're using XML syntax to close an empty element such as <link /> or <meta /> before you've used the <style> and <body> elements. in SGML and HTML 4.01, the /> syntax actually means this for empty elements: <link>> The > is treated as character data, which is not allowed in the <head>, but is within the <body>, so the <head> is implicitly closed and the <body> is opened. Thus any <style> or <body> elements following that are not allowed because, technically, they would be appearing within the <body>, which they cannot do. Of course, without seeing your actual makup, diagnosis is extremely difficult, so this is only speculation based on experience. I could be completely wrong, so next time, please provide a URL, or at least a snippet of the HTML causing the problem, but a URL is preferred. -- Lachlan Hunt http://lachy.id.au/ http://GetFirefox.com/ Rediscover the Web http://SpreadFirefox.com/ Igniting the Web
Received on Tuesday, 26 October 2004 02:01:28 UTC