Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - specifying DOCTYPE with invalid html

 
Thread Tools Search this Thread
Old 10-10-2003, 10:46 AM   #1
Default specifying DOCTYPE with invalid html


Does specifying a DOCTYPE break browsers, if the HTML within that page
is not valid for that DTD?

Why on earth would I want to do that anyway, you might ask. I have
been writing simple XHTML1.1 valid pages (according to the w3c
validator) with all layout and formatting in the CSS, as I have been
learning is the way to do things now. The problem is, I master a site
which up until now has been made in Frontpage2002. I can feel the
majority of you shifing uneasily in your chairs right now. FP and
valid XHTML?! What was I thinking! The issue is this: I want
form-to-email funtionality, FP makes this very easy to do, and I don't
know any cgi and am reluctant to get into that yet.

So if I make a valid XHTML1.1 page, and then add the FP form code
which produces errors in the validator, am I going to break browsers
because page contains invalid code? Or will it be rendered anyway? How
does this work?

TIA
Dave Higgins
(the site is www.leedscmr.org)


David Higgins
  Reply With Quote
Old 10-10-2003, 10:52 AM   #2
William Tasso
 
Posts: n/a
Default Re: specifying DOCTYPE with invalid html

David Higgins wrote:

> ...
> So if I make a valid XHTML1.1 page, and then add the FP form code
> which produces errors in the validator, am I going to break browsers
> because page contains invalid code? Or will it be rendered anyway? How
> does this work?


trial and error will be your only companions on that road.

btw: you don't need cgi to create the form.

--
William Tasso - http://WilliamTasso.com


  Reply With Quote
Old 10-10-2003, 11:01 AM   #3
brucie
 
Posts: n/a
Default Re: specifying DOCTYPE with invalid html

In post <>
David Higgins said...

> So if I make a valid XHTML1.1 page, and then add the FP form code
> which produces errors in the validator,


why cant you fix the markup FP spews out?

> am I going to break browsers because page contains invalid code? Or will it
> be rendered anyway? How does this work?


if the markup isn't valid instead of rendering the document as per the
specs that it /knows how to render/[1] because the specifications are
published and freely available the UA has to guess what the author
meant.

a) they may guess wrong.
b) they may not bother guessing at all.
c) they may not all guess the same way.
d) they may change the way they guess.
e) different versions may guess differently.
f) some markup may change the way they guess.
g) very few people would know how google guesses - or does it?

so, do you want to tell the UA what you want/mean or let it guess for
itself - maybe - if you're lucky?

[1] baring bugs, support etc.

--
brucie.
10/October/2003 07:54:55 pm
  Reply With Quote
Old 10-10-2003, 11:24 AM   #4
rf
 
Posts: n/a
Default Re: specifying DOCTYPE with invalid html


"brucie" <brucie-> wrote in message
news:...
> In post <>
> David Higgins said...
>
> why cant you fix the markup FP spews out?


Heaven forbid. Change something a WYSINWYG spits out? One might break
something

> if the markup isn't valid instead of rendering the document as per the
> specs that it /knows how to render/[1] because the specifications are
> published and freely available the UA has to guess what the author
> meant.
>
> a) they may guess wrong.
> b) they may not bother guessing at all.
> c) they may not all guess the same way.
> d) they may change the way they guess.
> e) different versions may guess differently.
> f) some markup may change the way they guess.
> g) very few people would know how google guesses - or does it?
>
> so, do you want to tell the UA what you want/mean or let it guess for
> itself - maybe - if you're lucky?


Your're just guessing

Cheers
Richard.


  Reply With Quote
Old 10-10-2003, 11:25 AM   #5
Matthias Gutfeldt
 
Posts: n/a
Default Re: specifying DOCTYPE with invalid html

David Higgins wrote:
> Does specifying a DOCTYPE break browsers, if the HTML within that page
> is not valid for that DTD?


LOL! As if browsers knew anything about valid HTML!


> So if I make a valid XHTML1.1 page, and then add the FP form code
> which produces errors in the validator, am I going to break browsers
> because page contains invalid code? Or will it be rendered anyway? How
> does this work?


Add the FP form code, fix the errors, and use the fixed code as a
template for new forms.


Matthias

  Reply With Quote
Old 10-10-2003, 11:33 AM   #6
brucie
 
Posts: n/a
Default Re: specifying DOCTYPE with invalid html

In post <5Nvhb.144850$>
rf said...

> Your're just guessing


i was hoping no one would notice


--
brucie.
10/October/2003 08:33:17 pm
  Reply With Quote
Old 10-10-2003, 11:55 PM   #7
Toby A Inkster
 
Posts: n/a
Default Re: specifying DOCTYPE with invalid html

Matthias Gutfeldt wrote:

> David Higgins wrote:
>> Does specifying a DOCTYPE break browsers, if the HTML within that page
>> is not valid for that DTD?

>
> LOL! As if browsers knew anything about valid HTML!


Maybe not, but they tend to know a thing or two about well-formed XML. If
you're using XHTML and you make a mistake that violates well-formedness,
then prepare for breakages.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump