/    Sign up×
Community /Pin to ProfileBookmark

trying to validate a form

total nube trying to validate
i am trying to validate my form generated with php as HTML 4.01 Strict
this is the form
<td align=”left” class=”boxText”>
<form name=”vendor_search” action=”https://zzzzz.com/xxxxx.php” method=”get”>
<input type=”text” name=”postcode” size=”10″ maxlength=”5″ >
<input type=”hidden” name=”action” value=”submit”>
<input type=”submit” value=”Enter Zip Code” title=” Enter Zip Code ” class=”button”>
</form>
</td>

thiese are the errors

[quote]Error Line 86, column 197: document type does not allow element “INPUT” here; missing one of “P”, “H1”, “H2”, “H3”, “H4”, “H5”, “H6”, “PRE”, “DIV”, “ADDRESS” start-tag .
===========================================


…e=”postcode” size=”10″ maxlength=”5″ ><input type=”hidden” name=”action” valu
===============================================

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

================================================

…”hidden” name=”action” value=”submit”><input type=”submit” value=”Enter Zip C
=========================================

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

=============================================

…le=” Enter Zip Code ” class=”button”> </form></td>
=========================================

end tag for “FORM” which is not finished .

================================================
… Zip Code ” class=”button”> </form></td>
[/quote]

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@CharlesMay 09.2006 — The FORM element cannot directly contain inline elements, there has to be a block level element between. Try DIV or FIELDSET.

Are you trying to mix HTML and XHTML? Switch to HTML.

That'll clear up the validity but you are still non-conforming. DON'T USE TABLES FOR LAYOUT!
Copy linkTweet thisAlerts:
@frank1002authorMay 10.2006 — thank you i managed to validate most of mypages to html 4.01 strict
Are you trying to mix HTML and XHTML? Switch to HTML.[/QUOTE]
why html and not xhtml what is the diffrence?

if you have time
Copy linkTweet thisAlerts:
@CharlesMay 10.2006 — why html and not xhtml what is the diffrence?[/QUOTE]A great deal and incompatable with each other. And unless you know what you are doing you can write an XHTML document that doesn't work on some or all HTML browsers - or combination browsers that think that your page is HTML.

XHTML has some nifty features but if you aren't using them Why XHTML and not HTML?
Copy linkTweet thisAlerts:
@frank1002authorMay 11.2006 — thanks i agree and i seem to be getting there so for now i am sticking with html

ps should i add that w3c verification link to my pages and if yes why
Copy linkTweet thisAlerts:
@NogDogMay 11.2006 — Some people put the verification link on their pages to brag, in a way. I do it for two reasons: to provide a convenient way for me to revalidate whenever I make a change, and to try to increase awareness of web standards to those who happen to visit my site.
Copy linkTweet thisAlerts:
@frank1002authorMay 15.2006 — ok guys

thank you very much i have almost validated my site but i have a couple of more questions

a- i have validated almost all pages in html 4.01 transitonal but managed to do some in strict is it inportant to do all in one or the other and which on is better

b- is there a way to validate

<a href="mailto: [email][email protected]">[email protected][/email]</a>

thanks for the help and i hope i am not abusing
×

Success!

Help @frank1002 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...