|
Posted by Jim Carlock on 08/06/06 04:12
>>Or use nl2br($text) to convert line breaks to <br>.
>
>That converts line breaks to <br /> which doesn't validate as
>HTML unless you do str_replace("<br />", "<br>", nl2br($text));
"Tim Roberts" <timr@probo.com> wrote:
> Interesting. I hadn't realized that form wasn't in the HTML standard.
> Every browser in the world will accept <br/>, and it is required for
> XHTML.
Do you know if the extra space in the <br /> was required at one time?
I just tested a page with <br/> and it validated as XHTML Transitional,
XHTML Strict, and HTML Strict and and it doesn't seem to be required.
For some reason though, I've always put that extra space in. I'm now
wondering why I put it in there...
HTML Strict doesn't validate the <meta /> tags in the header and requires
the meta tags configured as follows:
<meta name="description" content="test">
However, the closed /> tags validate (<br /> and <img />) when they're
in the body (HTML 4.0 Strict).
--
Jim Carlock
Post replies to the group.
Navigation:
[Reply to this message]
|