You are here: Re: "<br>" v "<br\>" « All PHP « IT news, forums, messages
Re: "<br>" v "<br\>"

Posted by ZeldorBlat on 05/26/06 17:04

robert wrote:
> "Martin Jay" <martin@spam-free.org.uk> wrote in message
> news:ACNM0fDWQvdEFwys@onenet.org.uk...
> | In message <HrqdnaFC05JRfevZRVnygA@bt.com>, MS
> | <nospamplaesegr8t_ukuk@yahoo.co.uk> writes
> | >Why do people use "<br/>" when outputting a string?
> | >
> | >the "<br>" seems to work !!
> |
> | In XHTML it should be <br /> and in HTML it should be <br>.
> |
> | If you don't know what XHTML is and when to use it, you should probably
> | be using HTML 4.01 (strict).
>
> hey wort (aka mj)...perhaps you could actually *help* this op and use the
> two or three sentences it would take to explain the reason(s) - such that he
> has a "v8" moment...as in, viola, ohhhhhh, etc.. else, your advise to use
> strict html 4.01 will be prompty filed in the op's circular bin as you give
> him NO incentive to follow said advice.
>
> however, by now you (and the rest here) know that i think the circular bin
> is where ANY AND ALL "advice" you give should be stored.

I'll give it a try then.

In XHTML all tags must close (and be properly nested). So, <foo></foo>
is fine, because it got closed. <foo> by itself (assuming there's no
</foo> anywhere else) is not fine because it doesn't close.

HTML doesn't have this requirement. Some tags (like <br>, <input>, and
<hr>) don't have closing tags. But this is not proper XHTML (or XML,
for that matter). So they have the concept of a "self-closing tag,"
which is what the <br/> is.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация