XHTML Strict & Forms

Status
Not open for further replies.

dhopton

Ars Tribunus Militum
2,009
code:<HR>
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<title>XHTML Tag: input</title>
</head>
<body>
<form action="html_form_action.asp" method="get">
<input type="text" name="fname" value="Mickey" />
<input type="text" name="lname" value="Mouse" />
<input type="submit" value="Submit" />
</form> 
</body>
</html>
When forced to validate using Transtional, I get no errors.
When validateing as strict I get the following:
code:<HR>
Code:
Line 10, column 48: 
  <input type="text" name="fname" value="Mickey" />
                                                  ^Error: element
"input" not allowed here; possible cause is an inline element
containing a block-level element 

Line 11, column 47: 
  <input type="text" name="lname" value="Mouse" />
                                                 ^Error: element
"input" not allowed here; possible cause is an inline element
containing a block-level element 

Line 12, column 37: 
  <input type="submit" value="Submit" />
                                       ^Error: element "input" not
allowed here; possible cause is an inline element containing a
block-level element
I'm pondering if i need to use XForms... do any browsers support XForms?
 

HitScan

Ars Tribunus Militum
2,523
Subscriptor++
Every example I could find used Transitional. I'm afriad you may have to use it. And I'm willing to bet nothing currently supports XForms, seeing as how the farthest thing along is some Java app that handles 75% or so. :)

I'd say use Strict for any page you can (i.e. without forms) and just use Trans on forms pages. It's better than nothing.

HitScan
 
Status
Not open for further replies.