Problems with form

F

Frogleg

http://home.earthlink.net/~absolutelyfake/test.htm

fails HTML 4.01 Strict validation rather spectacularly. The first
error,

"document type does not allow element "INPUT" here; missing one of
"P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS"
start-tag.,"

refers to the first <input> tag.

(It validates as HTML 4.01 Transitional)

Of course the form doesn't *work*, because that web space has no SS
facilities. I just want to know why it fails validation. Any ideas?
 
E

Edwin van der Vaart

Frogleg said:
http://home.earthlink.net/~absolutelyfake/test.htm

fails HTML 4.01 Strict validation rather spectacularly. The first
error,

"document type does not allow element "INPUT" here; missing one of
"P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS"
start-tag.,"

refers to the first <input> tag.

(It validates as HTML 4.01 Transitional)

Of course the form doesn't *work*, because that web space has no SS
facilities. I just want to know why it fails validation. Any ideas?
Change the doctype to a proper doctype eg.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Then try it again.
 
E

Edwin van der Vaart

Frogleg said:
http://home.earthlink.net/~absolutelyfake/test.htm

fails HTML 4.01 Strict validation rather spectacularly. The first
error,

"document type does not allow element "INPUT" here; missing one of
"P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS"
start-tag.,"

refers to the first <input> tag.

(It validates as HTML 4.01 Transitional)

Of course the form doesn't *work*, because that web space has no SS
facilities. I just want to know why it fails validation. Any ideas?
Change the doctype to a proper doctype eg.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Then try it again.
 
F

Frogleg

Forms may contain only block level elements. Those block level elements may
contain inline elements (such as <input>) in turn.

Could you be a little more specific about my problem?
 
E

Edwin van der Vaart

Frogleg said:
http://home.earthlink.net/~absolutelyfake/test.htm

fails HTML 4.01 Strict validation rather spectacularly. The first
error,

"document type does not allow element "INPUT" here; missing one of
"P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS"
start-tag.,"

refers to the first <input> tag.

(It validates as HTML 4.01 Transitional)

Of course the form doesn't *work*, because that web space has no SS
facilities. I just want to know why it fails validation. Any ideas?
Try with a proper doctype eg.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
 
P

picayunish

Frogleg schreef:
http://home.earthlink.net/~absolutelyfake/test.htm

fails HTML 4.01 Strict validation rather spectacularly. The first
error,

"document type does not allow element "INPUT" here; missing one of
"P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS"
start-tag.,"

refers to the first <input> tag.

(It validates as HTML 4.01 Transitional)

Of course the form doesn't *work*, because that web space has no SS
facilities. I just want to know why it fails validation. Any ideas?
Try it with a proper doctype eg.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
 
A

Adrienne

Could you be a little more specific about my problem?

The form element can only contain block level elements. The list the
validator gave you, "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS", "FIELDSET", "INS", "DEL" contains block level elements. Block
level elements can contain inline elements, such as INPUT, SELECT,
TEXTAREA. Therefore, you would pick the most appropriate element, which in
this case, would be the P, DIV, or FIELDSET elements.

I rather like using the FIELDSET and LEGEND elements because it gives
information about the form (in the legend element), and can also break up a
complicated form into smaller parts, eg:

<form ...>
<fieldset><legend>Contact Information</legend>
....
</fieldset>
<fieldset><legend>Employment Information</legend>
....
</fieldset>
<fieldset><legend>References</legend>
....
</fieldset>
</form>
 
F

Frogleg

Gazing into my crystal ball I observed Frogleg <[email protected]>
writing in news:[email protected]:

The form element can only contain block level elements. The list the
validator gave you, "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV",
"ADDRESS", "FIELDSET", "INS", "DEL" contains block level elements. Block
level elements can contain inline elements, such as INPUT, SELECT,
TEXTAREA. Therefore, you would pick the most appropriate element, which in
this case, would be the P, DIV, or FIELDSET elements.

Thank you. I read a lot more references and fixed the problem with
<p></p>. I can claim that w3schools led me astray. Their examples go
merrily from <form> to <input> to </form> without a Word of Warning. I
will read up on <fieldset>.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top