xhtml or html?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R. Rajesh Jeba Anbiah

    xhtml or html?

    I would like to know what HTML standard will be better for PHP
    webapplications ? Right now, I use HTML 4.01 Transitional. And like to
    know what *you* PHP programmers prefer? and which is good? TIA.

    --
    /\
    / \\ <http://www.homeless-international.o rg>
    / [] \\\ Email: rrjanbiah-at-Y!com
  • Cameron

    #2
    Re: xhtml or html?

    R. Rajesh Jeba Anbiah wrote:[color=blue]
    > I would like to know what HTML standard will be better for PHP
    > webapplications ? Right now, I use HTML 4.01 Transitional. And like to
    > know what *you* PHP programmers prefer? and which is good? TIA.
    >[/color]

    Well it doesn't really matter what version of HTML you use (XHTML is
    still HTML just newer) they are two different things, PHP is handled
    server side, (X)HTML handled client side, providing you output it
    correctly either will work, I however use XHTML as I prefer it.

    ~Cameron

    Comment

    • Stephen Poley

      #3
      Re: xhtml or html?

      On 23 Feb 2004 21:35:16 -0800, ng4rrjanbiah@re diffmail.com (R. Rajesh
      Jeba Anbiah) wrote:
      [color=blue]
      >I would like to know what HTML standard will be better for PHP
      >webapplication s? Right now, I use HTML 4.01 Transitional. And like to
      >know what *you* PHP programmers prefer? and which is good? TIA.[/color]

      As far as PHP itself is concerned, it makes no difference whatever.

      More generally, search the archive of
      comp.infosystem s.www.authoring.html for extensive discussions on the
      HTML versus XHTML issue. Brief summary: XHTML might have been a good
      idea, but the current state of play is that it has no real advantages
      over HTML (unless you are already using XML tools for something else)
      and certain problems related to e.g. MIME types and IE misbehaviour.

      The general recommendation is to use HTML 4.01 Strict for new pages. And
      keep your CSS in an external stylesheet - don't generate inline CSS with
      PHP.

      --
      Stephen Poley

      Comment

      • Geoff Berrow

        #4
        Re: xhtml or html?

        I noticed that Message-ID: <4l5m305q4uf3m2 1qnt3n5u59bujsk rp82c@4ax.com>
        from Stephen Poley contained the following:
        [color=blue]
        >The general recommendation is to use HTML 4.01 Strict for new pages.[/color]

        Though I haven't even seen anyone come up with convincing arguments for
        using strict over transitional.

        --
        Geoff Berrow (put thecat out to email)
        It's only Usenet, no one dies.
        My opinions, not the committee's, mine.
        Simple RFDs http://www.ckdog.co.uk/rfdmaker/

        Comment

        • Wÿrm

          #5
          Re: xhtml or html?

          <snip>[color=blue]
          > Though I haven't even seen anyone come up with convincing arguments for
          > using strict over transitional.[/color]

          I am not sure if it can be counted as argument or any good reason, but
          depending doctype, browser might end up different "rendering mode"



          (see difference between strict html 4.01, transitional 4.01 and transitional
          4.01 with "loose" doctype rendiering modes for browsers)...

          http://gutfeldt.ch/matthias/articles/doctypeswitch.html might also tell
          something more


          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: xhtml or html?

            Cameron <foo@bar.invali d> wrote in message news:<c1ep3s$i5 t$1@newsg3.svr. pol.co.uk>...[color=blue]
            > R. Rajesh Jeba Anbiah wrote:[color=green]
            > > I would like to know what HTML standard will be better for PHP
            > > webapplications ? Right now, I use HTML 4.01 Transitional. And like to
            > > know what *you* PHP programmers prefer? and which is good? TIA.
            > >[/color]
            >
            > Well it doesn't really matter what version of HTML you use (XHTML is
            > still HTML just newer) they are two different things, PHP is handled
            > server side, (X)HTML handled client side, providing you output it
            > correctly either will work, I however use XHTML as I prefer it.[/color]

            Thanks for your reply. IIRC, since PHP 4, they've added something
            like XHTML compliant especially in nl2br(), highlight_file( ),... But,
            I hardly seen such XHTMLed PHP scripts. May I know the reason behind
            your preference?

            --
            "Success is not what you achieve, but it is what you die for"
            If you live in USA, please support John Edwards.
            Email: rrjanbiah-at-Y!com

            Comment

            • Geoff Berrow

              #7
              Re: xhtml or html?

              I noticed that Message-ID: <c1fj05$cif$1@p hys-news1.kolumbus. fi> from
              Wÿrm contained the following:
              [color=blue]
              ><snip>[color=green]
              >> Though I haven't even seen anyone come up with convincing arguments for
              >> using strict over transitional.[/color]
              >
              >I am not sure if it can be counted as argument or any good reason, but
              >depending doctype, browser might end up different "rendering mode"
              >
              >http://gutfeldt.ch/matthias/articles...tch/table.html
              >
              >(see difference between strict html 4.01, transitional 4.01 and transitional
              >4.01 with "loose" doctype rendiering modes for browsers)...[/color]

              Indeed, but all this does is show that if I use <!DOCTYPE HTML PUBLIC
              "-//W3C//DTD HTML 4.01 Transitional//EN"
              "http://www.w3.org/TR/html4/loose.dtd">
              my pages will be rendered in a standard way. It doesn't say anything
              about the advantages of strict, AFAICS.

              I'm a little cynical about this as you can tell. I think some coders
              tend to self-flagellate. Emotive words like 'strict' versus
              'transitional' and 'loose' encourage this and tend to create impressions
              which do not hold up to scrutiny.

              --
              Geoff Berrow (put thecat out to email)
              It's only Usenet, no one dies.
              My opinions, not the committee's, mine.
              Simple RFDs http://www.ckdog.co.uk/rfdmaker/

              Comment

              • Wÿrm

                #8
                Re: xhtml or html?

                <snip>[color=blue]
                > Indeed, but all this does is show that if I use <!DOCTYPE HTML PUBLIC
                > "-//W3C//DTD HTML 4.01 Transitional//EN"
                > "http://www.w3.org/TR/html4/loose.dtd">
                > my pages will be rendered in a standard way. It doesn't say anything
                > about the advantages of strict, AFAICS.[/color]

                Yes, strict and transitional 4.01 with
                "http://www.w3.org/TR/html4/loose.dtd" should render to same way so no
                advantages there between those. :) only difference would be without that
                "...loose.d td" and then different mode might be in.

                [color=blue]
                > I'm a little cynical about this as you can tell. I think some coders
                > tend to self-flagellate. Emotive words like 'strict' versus
                > 'transitional' and 'loose' encourage this and tend to create impressions
                > which do not hold up to scrutiny.[/color]

                heh, I know how it can be :) I haven't been that much using strict 4.01,
                only in last half year or something after started to do some CSS stuff. Now
                I just try stick doing things one way as long as they work for me. And I
                guess bottom line always is that as long as it does work for YOU, do it in
                your way :)



                Comment

                • Brandon Blackmoor

                  #9
                  Re: xhtml or html?

                  R. Rajesh Jeba Anbiah wrote:[color=blue]
                  >
                  > I would like to know what HTML standard will be better
                  > for PHP webapplications ?[/color]

                  Everything I have done in the last couple of years is XHTML 1.0. Clean,
                  valid, and forward-compatible.

                  bblackmoor
                  2004-02-24

                  Comment

                  • Stephen Poley

                    #10
                    Re: xhtml or html?

                    On Tue, 24 Feb 2004 12:46:23 +0000, Geoff Berrow <blthecat@ckdog .co.uk>
                    wrote:
                    [color=blue]
                    >I noticed that Message-ID: <4l5m305q4uf3m2 1qnt3n5u59bujsk rp82c@4ax.com>
                    >from Stephen Poley contained the following:
                    >[color=green]
                    >>The general recommendation is to use HTML 4.01 Strict for new pages.[/color][/color]
                    [color=blue]
                    >Though I haven't even seen anyone come up with convincing arguments for
                    >using strict over transitional.[/color]

                    Are you saying that you can't see the advantage of replacing hundreds of
                    HTML FONT elements with a single CSS rule? Or that no-one explained to
                    you that this (somewhat simplified) is the advantage?

                    --
                    Stephen Poley

                    Comment

                    • John Dunlop

                      #11
                      Re: xhtml or html?

                      Geoff Berrow wrote:
                      [color=blue]
                      > I noticed that Message-ID: <4l5m305q4uf3m2 1qnt3n5u59bujsk rp82c@4ax.com>
                      > from Stephen Poley contained the following:
                      >[color=green]
                      > >The general recommendation is to use HTML 4.01 Strict for new pages.[/color][/color]

                      Yup, I've noticed that.
                      [color=blue]
                      > Though I haven't even seen anyone come up with convincing arguments for
                      > using strict over transitional.[/color]

                      I couldn't find any.

                      The purpose of the Strict variation is, I believe, to aid in the
                      filtration of outdated constructs from HTML. Strict is just a subset
                      of the more common Transitional variation. That's all.

                      I reckon puritanical authors believe that by conforming to this more
                      restrictive subset of the "language" (better: "notation") , they're
                      tip-toeing one step closer to ML enlightenment and sneakily
                      advertising their knowledge and ability in the hope that someone
                      somewhere will pick up on it. Maybe I'm daydreaming. :-)

                      Unlike the Transitional DTD, the Strict DTD prohibits deprecated
                      markup; the term "deprecated " is defined in HTML:



                      Using Strict instead of Transitional HTML isn't the all-important
                      factor. Authors ought to understand the reasons why presentational
                      markup is deprecated and attracts disapproval, and why it's of less
                      value than logical, descriptive, structural markup; knowing why and
                      how to *sensibly* avoid procedural notations is the important part.
                      Armed with that basic ken, one can author logical markup; without it,
                      markup is destined to contain a thorough sprinkling of
                      "illogicalities ", be it Transitional *or* Strict. Education is the
                      all-important factor.

                      Easy to understand examples and reference documentation to help you learn how to code in HTML, CSS, PHP, SQL, JavaScript, Python, and more.


                      Consider for a moment this idiotic scrap of slipshod markup, which,
                      as it happens, validates as Strict HTML4.01:

                      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
                      <title>intro</title>
                      <p><strong style="font-size:20pt">my intro</strong>
                      <div>this page is about rope jumping... i'm so completely clueless
                      i failed to mention that in the title of my page but im waaaay to
                      mega k3wl to bother my ass!!1</div>
                      <h1>Hahahahaha! !!!11</h1>
                      <div>now lets start......<a href="foo bar">baz</a> omg aint i the
                      king of jabberwocky?/???!!1!1!</div>

                      On the other hand, cases exist where deprecated FONT markup would
                      come in useful. For validation, then, you'd have to either create a
                      custom DTD or switch to Transitional. Education is the key.

                      Since we're discussing strictness, would it be better to keep shtum
                      about *the* (only) HTML standard: ISO/IEC 15445? ;-)

                      The whys behind downgrading from HTML4.01 to XHTML1.0, however, are
                      mostly incomprehensibl e: maybe it's the phase of the moon; possibly
                      it's the side of the bed the author crawled out from; or, perhaps
                      almost invariably, it's the perceived necessity to subscribe to that
                      oh-so-idolatrous fad du jour. I dunno.

                      Hmm. We're drifting dreadfully off-topic, aren't we?

                      --
                      Jock

                      Comment

                      • Geoff Berrow

                        #12
                        Re: xhtml or html?

                        I noticed that Message-ID: <02gn30d82rivie 8739psvegn9kmnm i4phq@4ax.com>
                        from Stephen Poley contained the following:
                        [color=blue][color=green]
                        >>Though I haven't even seen anyone come up with convincing arguments for
                        >>using strict over transitional.[/color]
                        >
                        >Are you saying that you can't see the advantage of replacing hundreds of
                        >HTML FONT elements with a single CSS rule? Or that no-one explained to
                        >you that this (somewhat simplified) is the advantage?[/color]


                        If that was all it was I'd go to strict tomorrow, since I can't remember
                        that last time I used a <font> tag.
                        --
                        Geoff Berrow (put thecat out to email)
                        It's only Usenet, no one dies.
                        My opinions, not the committee's, mine.
                        Simple RFDs http://www.ckdog.co.uk/rfdmaker/

                        Comment

                        • Andy Hassall

                          #13
                          Re: xhtml or html?

                          On Tue, 24 Feb 2004 22:22:08 +0100, Stephen Poley
                          <sbpoleySpicedH amTrap@xs4all.n l> wrote:
                          [color=blue]
                          >On Tue, 24 Feb 2004 12:46:23 +0000, Geoff Berrow <blthecat@ckdog .co.uk>
                          >wrote:
                          >[color=green]
                          >>I noticed that Message-ID: <4l5m305q4uf3m2 1qnt3n5u59bujsk rp82c@4ax.com>
                          >>from Stephen Poley contained the following:
                          >>[color=darkred]
                          >>>The general recommendation is to use HTML 4.01 Strict for new pages.[/color][/color]
                          >[color=green]
                          >>Though I haven't even seen anyone come up with convincing arguments for
                          >>using strict over transitional.[/color]
                          >
                          >Are you saying that you can't see the advantage of replacing hundreds of
                          >HTML FONT elements with a single CSS rule? Or that no-one explained to
                          >you that this (somewhat simplified) is the advantage?[/color]

                          That's an argument for using CSS appropriately; not going to argue with that,
                          I fully agree with widespread use of CSS. Once you have the same style applied
                          more than once in a page, and particularly across pages, it's a CSS class, no
                          arguing.

                          But HTML Strict does rule out quite a lot of stuff - is it really
                          cost-efficient to have a CSS class for a one-off bit of highlighting? Geoff's
                          'self-flagellation' point seems about right here - what's the real advantage,
                          other than the warm fuzzy feeling of adhering to stricter standards?

                          With XHTML Strict at least you could argue that then your data is XML-parsable
                          without having to think about presentation - but you're still effectively
                          wrapping it in HTML, so surely you'd have an XML source underneath, and apply
                          XSLT to turn it into XHTML?

                          --
                          Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
                          <http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>

                          Comment

                          • Stephen Poley

                            #14
                            Re: xhtml or html?

                            On Tue, 24 Feb 2004 22:13:43 +0000, Andy Hassall <andy@andyh.co. uk>
                            wrote:
                            [color=blue]
                            >On Tue, 24 Feb 2004 22:22:08 +0100, Stephen Poley
                            ><sbpoleySpiced HamTrap@xs4all. nl> wrote:
                            >[color=green]
                            >>On Tue, 24 Feb 2004 12:46:23 +0000, Geoff Berrow <blthecat@ckdog .co.uk>
                            >>wrote:
                            >>[color=darkred]
                            >>>I noticed that Message-ID: <4l5m305q4uf3m2 1qnt3n5u59bujsk rp82c@4ax.com>
                            >>>from Stephen Poley contained the following:
                            >>>
                            >>>>The general recommendation is to use HTML 4.01 Strict for new pages.[/color]
                            >>[color=darkred]
                            >>>Though I haven't even seen anyone come up with convincing arguments for
                            >>>using strict over transitional.[/color][/color][/color]
                            [color=blue][color=green]
                            >>Are you saying that you can't see the advantage of replacing hundreds of
                            >>HTML FONT elements with a single CSS rule? Or that no-one explained to
                            >>you that this (somewhat simplified) is the advantage?[/color][/color]
                            [color=blue]
                            > That's an argument for using CSS appropriately; not going to argue with that,
                            >I fully agree with widespread use of CSS. Once you have the same style applied
                            >more than once in a page, and particularly across pages, it's a CSS class, no
                            >arguing.
                            >
                            > But HTML Strict does rule out quite a lot of stuff - is it really
                            >cost-efficient to have a CSS class for a one-off bit of highlighting?[/color]

                            ??. Strict doesn't stop you from using inline styles if you want that.

                            I know just one thing that Strict rules out that is *occasionally*
                            wanted, and that is being able to open new windows with the target
                            attribute. But in approximately 95% of cases where websites open a new
                            window there is no good reason to do so. The reader can always open a
                            link in a new window anyway if he/she wants that.

                            [color=blue]
                            >Geoff's
                            >'self-flagellation' point seems about right here - what's the real advantage,
                            >other than the warm fuzzy feeling of adhering to stricter standards?[/color]

                            One could as easily turn that around. If you make appropriate
                            separation of content and presentation, which I gather you accept as a
                            good thing, what's the advantage of validating against a DTD with a lot
                            of legacy junk in it?

                            An example of an advantage to Strict is if you're cutting and pasting
                            out of old pages, and you thought you'd got rid of all the old FONT
                            elements, but missed some.

                            If one has a bunch of valid Transitional pages, then turning them into
                            Strict pages (if one doesn't need to make other changes anyway) is
                            probably akin to self-flagellation. But if one is making a *new* page
                            then I know no advantage to using Transitional. Well OK, except in two
                            situations:
                            - if you will help the reader by opening a new window, as mentioned
                            above (rare);
                            - if you work for an organisation that still has Netscape 4 as its main
                            browser (talk about self-flagellation... )

                            But I agree with John Dunlop when he says that what matters is
                            understanding what you're doing. Strict isn't a magic wand - just a prod
                            in the right direction.

                            --
                            Stephen Poley

                            Comment

                            • Geoff Berrow

                              #15
                              Re: xhtml or html?

                              I noticed that Message-ID: <ls1p30hffh3ipg 8uhfigjijh12ud2 1io38@4ax.com>
                              from Stephen Poley contained the following:
                              [color=blue]
                              >I know just one thing that Strict rules out that is *occasionally*
                              >wanted, and that is being able to open new windows with the target
                              >attribute. But in approximately 95% of cases where websites open a new
                              >window there is no good reason to do so.[/color]


                              I can think of loads of meaningful uses.

                              Looking at a larger version of a thumbnail
                              Explanatory notes.
                              Opening other types file, eg Word documents
                              Browsing large indexes
                              Running sub queries on a database

                              I find new windows useful for me in these and many other circumstances

                              --
                              Geoff Berrow (put thecat out to email)
                              It's only Usenet, no one dies.
                              My opinions, not the committee's, mine.
                              Simple RFDs http://www.ckdog.co.uk/rfdmaker/

                              Comment

                              Working...