W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2002

Re: /> in head of xhtml page being rendered by emacs-w3

From: Kynn Bartlett <kynn-edapta@idyllmtn.com>
Date: Sun, 20 Jan 2002 17:54:37 -0800
Message-Id: <a05101003b871247d0bca@[]>
To: jonathan chetwynd <j.chetwynd@btinternet.com>, w3c-wai-ig@w3.org
At 10:18 PM +0000 1/20/02, jonathan chetwynd wrote:
>"/>" in head of xhtml page being rendered by emacs-w3 (gnu 20.7.1)
>Has anyone else has seen this using a different browser?
>is there a solution other than just waiting for an upgrade, or did I 
>miss some vital code out?
>http://www.peepo.com/index.html currently demonstrates this rather 

It's appropriate behavior for an HTML browser.  In HTML, a funny
character like /> indicates the premature end of a tag, and thus
"something else."  In a <head> statement, you can't have free-floating
character data outside of an element.  So this is (properly, I
believe) interpreted to mean "we've reached something which isn't
<head>, so this must be <body>, with both the closing tag for
<head> and the start tag of <body> left off."  (Recall that in HTML,
closing and opening tags for <head> and <body> are optional, and
will be inferred if they are not provided.)

And so the /> is the start of your body content, so it gets displayed.

This is a case where XHTML -- even XHTML written according to the
W3C's guidelines for proper compatibility, e.g. spaces before the
/ -- can cause problems in HTML-compliant browsers.  XHTML is _not_
designed to be 100% backwards-compatible with HTML browsers, only
about 99.44% compatible.


Kynn Bartlett <kynn@idyllmtn.com>                 http://kynn.com
Chief Technologist, Idyll Mountain            http://idyllmtn.com
Web Accessibility Expert-for-hire          http://kynn.com/resume
January Web Accessibility eCourse           http://kynn.com/+d201
Forthcoming: Teach Yourself CSS in 24 Hours
Received on Sunday, 20 January 2002 21:11:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:07 UTC