html strict

This is a discussion on html strict within the PHP Language forums, part of the PHP Programming Forums category; Hi Guys I have recently changed a site from html to php. In my HTML, I used the <!DOCTYPE ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-10-2005
WindAndWaves
 
Posts: n/a
Default 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



Reply With Quote
  #2 (permalink)  
Old 01-10-2005
rf
 
Posts: n/a
Default Re: html strict

"WindAndWaves" <access@ngaru.com> wrote

> 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?


&amp;

--
Cheers
Richard.


Reply With Quote
  #3 (permalink)  
Old 01-10-2005
Jukka K. Korpela
 
Posts: n/a
Default Re: html strict

"WindAndWaves" <access@ngaru.com> wrote:

> 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.


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).

> 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.


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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:47 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0