This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9685 - empty elements in polyglot documents
Summary: empty elements in polyglot documents
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML/XHTML Compat. Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: FPWD
Assignee: Eliot Graff
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/html-xhtml-au...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-07 19:38 UTC by Eliot Graff
Modified: 2010-10-05 13:07 UTC (History)
4 users (show)

See Also:


Attachments

Description Eliot Graff 2010-05-07 19:38:03 UTC
Currently, the spec says this about empty elements:

You may use only the elements in the following table as empty elements. 

area
base
br
col
command
embed
hr
img
input
keygen
link
meta
param
source
You must use the minimized tag syntax for empty elements, e.g. <br/>. The alternative syntax <br></br> allowed by XML gives uncertain results in many existing user agents. 

Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />). 

Note that MathML and SVG elements may be either self-closing or contain content. 

Other issues have arisen in feedback and need to be resolved:
--  Many elements, such as <i> and <b>, are ones where <i/> and <b/> would most likely cause behavior that is decidely unexpected.
--  What to say about completely new elements, where <newEmptyElement></newEmptyElement> 
has better text/html compatibility than <newEmptyElement />
--  Should "Given an empty instance of an element whose content model is not
EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />)" use the RFC2119 MUST NOT?
--  What to say about legacy elements, like the 'br' element?
--  What to say about other legacy elements, like 'meta', 'img', 'embed' and 'param'?
--  What do we say about white space and newline characters in empty elements?
--  What special considerations must be made for <i/> or <b/> and other inline elements?


Related emails:
1. http://lists.w3.org/Archives/Public/public-html/2010Apr/1095.html
2. http://lists.w3.org/Archives/Public/public-html/2010Apr/1102.html
3. http://lists.w3.org/Archives/Public/public-html/2010Apr/1166.html
4. http://lists.w3.org/Archives/Public/public-html/2010Apr/1191.html
5. http://lists.w3.org/Archives/Public/public-html/2010Apr/1192.html
Comment 1 Eliot Graff 2010-09-27 21:49:31 UTC
I have opened individual bugs as they apply. This has too many issues in it to be a good bug.