Re: OT: HTML (WAS: MF having issues?)



"James J. Gavan" <jgavandeletethis@xxxxxxx> wrote in message news:lUKNf.86659$sa3.61137@xxxxxxxxxxx
It is absolutely BLOODY RIDICULOUS that somebody would design a version of HTML which screws up on :-

> "Bla bla bla" - <em>some guy</em>

Taking COBOL as an example :-

ADD A TO BE GIVING C

That's *exactly* what we expect to happen - and unless he is a space cadet, a developer does not expect the result in variable C to contain the Square Root or a Factorial ! Want to 'enhance' the language/tool - don't *substitute* but come up with an *extension*.

Right, the example above, with the <em> tag (for emphasis), comes from web developers inapporpriately depending on undocumented features. That is, the standard says that the <em> tag should be used for emphasizing text.

But let's say I don't actually read the standards, but just try out the <em> tag to see what it does, and I notice that on my particular browser, the <em> tag displays the text in italics (because the browser implementor decided that italics is a good way to emphasize text, for example). I might say "Oh, so the <em> tag just makes text appear in italics", and then start depending on the fact that it'll render in italics. Maybe in a future version of the browser, the browser implementor will decide "maybe rendering the text in bold is a better indication of emphasis", and so they change it so that <em> now causes text to appear in bold. So now my HTML page may be broken, for example, if it contained text like this:

--------------------------------------

Please type in the text below in italics exactly as they appear.

<em>ADD a TO b GIVING c</em>

--------------------------------------

And then someone viewing this page will not see ANY text in italics at all; only text in bold, and might become very confused.


Don't try and control people from making extensions, PROVIDING they are documented - at some future date a standards body might see the efficacy of incorporating that into an updated standard.

However there is a downside with a product like HTML as you illustrated - how does your Browser get around identifying standard entries and extensions ?

I believe the HTML standard specifies that browsers should always simply ignore any tags that they don't understand. This is to allow potentially infinite forward compatibility. For example, I could have an HTML document as follows:

--------------------------------------

Please use the following Java applet to calculate your shipping fees

<applet code="shippingCalculator.jar">
Unfortunately, your browser does not seem to support applets. You can download Sun's JVM from http://java.sun/com/
</applet>

--------------------------------------

The idea is that browsers who do not recognize the <applet> tag will simply ignore that tag, and display the text without any special formatting (for all it knows, perhaps the <applet> tag is supposed to cause the text to appear in purple on yellow font, underlined).

Browsers that DO recognize the applet tag understand that the appropriate interpretation is actually to not render any content between the opening and closing tag at all (so these browsers will not display the "Unfortunately, your etc." message), and instead to download the "shippingCalculator.jar" file, and execute it as an applet.

However, the W3C (World Wide Web Consortium), strongly discourages browsers from producing extensions, because they argue it will create a fragmented web, where certain pages can only be used by browser A, and other pages can only be used by browser B, whereas the goal of the web is to be accessible to everyone with an Internet connection.

- Oliver

.



Relevant Pages

  • Re: OT: HTML (WAS: MF having issues?)
    ... Right, the example above, with the tag, comes from web developers inapporpriately depending on undocumented features. ... But let's say I don't actually read the standards, but just try out the tag to see what it does, and I notice that on my particular browser, the tag displays the text in italics. ... So now my HTML page may be broken, for example, if it contained text like this: ...
    (comp.lang.cobol)
  • Re: Can you render and image in ASP.NET?
    ... the client (browser). ... the image bytes back to the browser, you will need an tag in the page ... HTML whose source is the ASPX page that constructs the image. ... > Is there any possibility to render images for the web in asp.net? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Tail a logfile to a web page
    ... > different techniques usable with a web browser. ... A HTML interface ... The page will refresh every nn seconds. ... REFRESH is not a tag. ...
    (comp.infosystems.www.authoring.html)
  • Re: java detection test on a webpage with applet
    ... the applet cannot be displayed in this browser. ... My understanding of HTML is that if the browser doesn't recognize a tag, it simply ignores it, so if the browser doesn't know about the APPLET tag, it should simply treat the document as if the tag was not there, and thus anything that's legal without the APPLET tag should be legal with it. ...
    (comp.lang.java.help)
  • Re: java detection test on a webpage with applet
    ... the applet cannot be displayed in this browser. ... My understanding of HTML ... is that if the browser doesn't recognize a tag, it simply ignores it, so ...
    (comp.lang.java.help)