Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Inconsistent & and ;

Quote Reply
Inconsistent & and ;
Some url's seem to use ; and others &

Any reason?
Quote Reply
Re: [RedRum] Inconsistent & and ; In reply to
; is easier to type, but browsers use &. GT::CGI works fine with both. We tend to use ; almost everywhere - the main reason is that in a tag, the & has to be escaped into & but nothing special has to be done with ;.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Inconsistent & and ; In reply to
Hi Jason

Exactly my findings. I have my own modified version of CGI.pm to handle ; and &. I use ; always in my scripts because it helps not to escape, and after all, it is the standard set by W3C.

But after practcing this for a while, I was bemused why browsers _still_ send their environemtn variables seperated by a & sign. The W3C standard should have got rid of this back in 1997! Ugh.

Rgds

- wil
Quote Reply
Re: [Wil] Inconsistent & and ; In reply to
I think it's because the W3C comes up with some really stupid suggestions, so most people writing browsers tend to ignore it. For example, you aren't supposed to use <b>bold</b> tags anymore - you now have to do something like <div style="font-weight: bold">bold</div>. Please explain to me how that is an improvement.

CGI.pm has supported ; for quite some time - the CGI.pm distributed with Perl 5.00503 supports it; I'm not sure how long before that it was supported.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Inconsistent & and ; In reply to
Yep. CGI.pm as far back as I've ever used it (that's gotta be 3 years +) has supported ; as well as &. I just never knew about it until I tried. It's one of those undocumented features.

Regarding the font:weight business. It kinda forces you into the habit of using Stylesheets, which is a good thing IMO. I'll have to disagree with you; I honestly see it an improvement.

- wil
Quote Reply
Re: [Wil] Inconsistent & and ; In reply to
Yes, I do see the benefits of styles, however when all you want to do is make one word bold, it seems a little pointless to have to use styles for it.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Inconsistent & and ; In reply to
Yes. But theoreticaly you would of defined your normal, italicised and bolded text at the beginning of your document and/or in a seperate style sheet. Therefore that's all you would need to do would be to reference a class.

I do see your point, though, which is why I don't think any browser will abandon support of the traditional, simplistic <i>, <b> .. tags.

- wil
Quote Reply
Re: [Wil] Inconsistent & and ; In reply to
How is <div class="bold-text">bold</div> (or similar) any better than <b>bold</b>? I think it's just W3C making things different just for the sake of making things different - not because there is any practical purpose in doing so. Yes, you should be able to use font-weight: bold, but you should also be able to use <b>...</b>.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Inconsistent & and ; In reply to
No one said that you can not use both. What is not recommended is using both styles in one document. Purely to stop confusion.

You can understand why they are insitsting or pushing it though. They want people and browsers to adopt a new CSS standard. How are they going to manage that if people are still stuck with HTML 3.2? By forcing people to use a new standard it helps to promote that standard and hopefuly get it recognised by future web browsers.

- wil
Quote Reply
Re: [Wil] Inconsistent & and ; In reply to
Hmmm, I though I heard someone say that <b> tags were no longer allowed in HTML.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] Inconsistent & and ; In reply to
You might of seen these tags marked as "depreciated" in the latest HTML 4.1 standard. However, the footnote warns of depreciation of tags as something like "Depreciated. This indicates that the tag is now better supported using another tag. Note that this tag *might* be dropped in future versions of HTML."

So, the way I read that is that it is depreciate, because they're trying to get you to use style sheets. The general warning of depreciation is that a tag could be dropped in _future_ versions (but not this one) so execrcise caution. I doubt that such common tags, and indeed core HTML tags will be dropped however. That would cause havoc amongst web users, browsers, vendors, authoring tools and the web general. So I think you're safe with those, but the W3 would *prefer* you to use another tag.

- wil

Last edited by:

Wil: Jan 10, 2002, 12:50 PM
Quote Reply
Re: [Wil] Inconsistent & and ; In reply to
In Reply To:
You might of seen these tags marked as "depreciated" in the latest HTML 4.1 standard.
Yeah, so if you use <B> tags in HTML 4.x strict, the w3c validator will complain.

Adrian
Quote Reply
Re: [brewt] Inconsistent & and ; In reply to
Yes, but that doesn't mean that you can no longer use the tags, nor does it mean that the tags will no longer be supported by browsers. It just means there is a new, and supposedly, better way of doing what you're trying to achieve.

- wil

Last edited by:

Wil: Jan 11, 2002, 1:22 AM
Quote Reply
Re: [Wil] Inconsistent & and ; In reply to
If you want it to pass w3c's 4.x strict validation you CAN'T use those depreciated tags. Otherwise you'll have to use transitional. Of course the browsers will work fine as they're made to work with broken non-standard HTML.

In Reply To:
It just means there is a new, and supposedly, better way of doing what you're trying to achieve.
As Jason was trying to point out, not necessarily Smile

Adrian
Quote Reply
Re: [brewt] Inconsistent & and ; In reply to
I guess we differ on opinions, then. :-)

- wil