Previous Message
Next Message

Re: Strict and Javascript

Sent by David Dorward on 7 September 2005 12:12

On 9/6/05, George L Smyth [EMAIL-REMOVED]> wrote:
> I am using <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> ""> as my doctype 

You might want to read:

HTML 4.01 is rather better suited to the web of today then XHTML.

> it will not validate because is telling
> me that the less than sign in my "for" statement is not valid [ for (i = 0; i
> < 10; i++) { ].

< indicates that you are trying to start a tag (at least it does
there, if you were using HTML then the content module of the <script>
element would allow you to use < characters freely.


.... and move your script to an external file.

> Also, I have to give an image a name so that I can address it,
> and that is not validating either.

Use an id instead. Name is used pretty much ONLY to decide how the
browser should label the values of form controls when submitting a

> Are these actual problems with Strict or is the validator getting confused. 

See the quote at the top of the validator FAQ page.

David Dorward <><>
css-discuss [EMAIL-REMOVED]]
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: