specifying DOCTYPE with invalid html

D

David Higgins

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

William Tasso

David said:
...
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.
 
B

brucie

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

rf

brucie said:
In post <[email protected]>
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.
 
M

Matthias Gutfeldt

David said:
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
 
T

Toby A Inkster

Matthias said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top