troubleshooting Question

Forms in XHTML

Avatar of Reklaw
Reklaw asked on
Web Languages and StandardsHTML
2 Comments1 Solution471 ViewsLast Modified:
I'm trying to create a simple page with a form to get people to enter an email address.

I'm trying to use the strict XHTML DTD (seemed like a good idea at the time....)

I have:

<form action="emailthanks.asp" method="post" id="emailinfo" >
      <input name="emailaddress" type="text" id="emailaddress" size="50" maxlength="100" />
      <input type="submit" name="Submit" value="Submit" />
</form>

When I validate the page in Dreamweaver I get a warning which says:
"The tag:"input" is not allowed within: "form" It is only allowed within: a, abbr, acronym, address...."

If I change to the transitional DTD no warning is generated.

How do you use <input> in strict XHTML if it can't be inside <form></form>?

MikeW

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros