in reply to close end tag

<br /> tags don't have closing tags in html. They're either written as I've done here, or written without the / which will work fine if parsed as html but fail for xhtml, which requires the closing / (but it goes inside the same tag for br). You should not be looking for </br> tags, because they should not be there.

(Update: except, as ikegami rightly points out below, you can have <br></br>tags in xhtml.)

Replies are listed 'Best First'.
Re^2: close end tag
by ikegami (Patriarch) on Aug 27, 2009 at 07:00 UTC

    <br /> tags don't have closing tags in html.

    That statement is wrong by definition. <br/> is short for <br></br>, so you're saying that something with a closing tag can't have a closing tag.

    (Technically, <br/.../ is short for <br>...</br> in HTML, but the HTML parsers used by web browsers don't support that. If they did, it would also be invalid since the BR element cannot have content or a closing tag.)

    <br></br> is perfectly valid XHTML. It's the unabbreviated form of <br/>.

      I think the intent was clear. If you prefer, read it as "don't have separate closing tags in html."

        You used the term "html" to refer to both the SGML and XML serialisations of HTML, so I thought you might have been saying <br></br> is not allowed in XHTML either.