html strict

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WindAndWaves

    html strict

    Hi Guys

    I have recently changed a site from html to php. In my HTML, I used the

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD">

    header and I made sure that the page was validated.

    I now do not seem to be able to validate my page any longer because I use a
    literal ampersand (&) in one of the links.

    What should I do to make it work?

    TIA

    - Nicolaas



  • rf

    #2
    Re: html strict

    "WindAndWav es" <access@ngaru.c om> wrote
    [color=blue]
    > I now do not seem to be able to validate my page any longer because I use[/color]
    a[color=blue]
    > literal ampersand (&) in one of the links.
    >
    > What should I do to make it work?[/color]

    &amp;

    --
    Cheers
    Richard.


    Comment

    • Jukka K. Korpela

      #3
      Re: html strict

      "WindAndWav es" <access@ngaru.c om> wrote:
      [color=blue]
      > I have recently changed a site from html to php. In my HTML, I used
      > the
      >
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      > "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD">
      >
      > header and I made sure that the page was validated.[/color]

      The above document type declaration is not correct. In a document type
      declaration, the strings within quotation marks are case sensitive.
      A validator may choose to use the first one (the formal public identifier)
      and not even look at the second one, but declaration is still incorrect and
      may trigger "quirks mode" in browsers (though nobody really knows how they
      do their doctype sniffing in detail).
      [color=blue]
      > I now do not seem to be able to validate my page any longer because I
      > use a literal ampersand (&) in one of the links.[/color]

      As "rf" wrote, use &amp; instead. I'm pretty sure the validator's error
      message said the same, though perhaps in more general terms. See also the
      FAQ entry http://validator.w3.org/docs/help.html#faq-ampersand which refers
      to the http://www.htmlhelp.com/tools/valida...blems.html#amp

      This has nothing to do with PHP, so I have trimmed followups to alt.html.

      --
      Yucca, http://www.cs.tut.fi/~jkorpela/
      Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


      Comment

      Working...