Re: cdata and javascript
- From: Harlan Messinger <hmessinger.removethis@xxxxxxxxxxx>
- Date: Mon, 28 Jan 2008 12:05:09 -0500
Jeff wrote:
Andy Dingley wrote:On 28 Jan, 14:46, Jeff <jeff@xxxxxxxxxxxxxxx> wrote:
I don't have a problem with writing HTML XHTMLish, I even like the much
maligned <br />.
Why? That's just plain wrong.
Why? It's a self closing tag and it works in every browser. The trend is toward closing every tag you open.
In HTML, <br> is one of the tags (along with <input>, <link>, <meta:>, and so forth) that doesn't *have* a closing tag, so it's equally meaningless to make the opening tag a "self-closing" tag. Moreover, the slash has another meaning in SGML (HTML is to SGML as XHTML is to XML) as follows:
<title/My Page/
is equivalent to
<title>My Page</title>
So
<br />This sentence has a / (slash) character.
would be treated in a correctly performing HTML user agent as
<br>>This sentence has a </br> (slash) character.
which is certainly not what you want. The reason
<br />
works in real browsers is that they haven't implemented that detail of SGML--in other words, it relies on a browser deficiency. Instead they wind up treating the slash as something that simply doesn't belong there, and they handle it the same way they handle anything that doesn't belong there--they pretend it isn't there. That doesn't mean it's valid--it isn't. It's just being ignored.
.
- Follow-Ups:
- Re: cdata and javascript
- From: Jeff
- Re: cdata and javascript
- References:
- cdata and javascript
- From: Jeff
- Re: cdata and javascript
- From: Jukka K. Korpela
- Re: cdata and javascript
- From: A-OK-SITE
- Re: cdata and javascript
- From: cwdjrxyz
- Re: cdata and javascript
- From: Jeff
- Re: cdata and javascript
- From: Andy Dingley
- Re: cdata and javascript
- From: Jeff
- cdata and javascript
- Prev by Date: Re: cdata and javascript
- Next by Date: Re: cdata and javascript
- Previous by thread: Re: cdata and javascript
- Next by thread: Re: cdata and javascript
- Index(es):
Relevant Pages
|
|