Once again, I blew it. Yes, the XML syntax is <p>...</p> for a balanced tag pair, and <hr/> for an 'unbalanced' tag. Since <hr/> is definately NOT legal HTML, the <hr /> syntax was adopted, it is a legal unbalanced XML tag, and is also legal HTML.
An HTML parser looks at <hr /> and says, ok, this is an HR tag (it groks this), with a "/" attribute, which it can't grok. Anything that HTML/XML etc cannot understand, they are requried to ignore. So <HR /> is the same as <HR>, and both are legal HTML. Only <HR /> is legal XML. Same is true with a longer tag, such as <IMG SRC="foo.gif" /> ... html parsers don't grok the / and throw it away, but they will process the SRC attribute. ----- Original Message ----- From: "Jason Lingohr" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "William A. Rowe, Jr." <[EMAIL PROTECTED]> Sent: Wednesday, June 27, 2001 9:18 PM Subject: Re: Trailing slashes in HTML tags? > On Wed, Jun 27, 2001 at 10:36:48AM -0500, William A. Rowe, Jr. wrote: > > > My mistake, try that again... > > > > <p/>test</p> is illegal for all older parsers. > > > > <p />test</p> is legal for all older parsers, and the '/' keyword is > > ignored. > > > > Bill > > Ok, but what about this case (from index.html.en): > > <hr width="50%" size="8" /> > <div align="center"><img src="apache_pb.gif" alt="" /></div> > > > > -- > ---------------------------------------------------------------------------- > Jason Lingohr > [EMAIL PROTECTED] > ---------------------------------------------------------------------------- > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]