|
Posted by Jonathan N. Little on 12/18/20 11:37
Paul Watt wrote:
> Hi,
> The following code fails validation when used with a html 4.01 strict DTD.
> why and how can i fix it?
> TIA
> Paul
>
> <form action="/cgi-sys/entropysearch.cgi" target=searchwindow
> class="search">
> <img src="images/search.gif" alt="search" width="70" height="13">
> <input type="text" name="query" value="" />
> <input type="hidden" name="user" value="dunmowka" />
> <input type="hidden" name="basehref" value="http://dunmowkarate.co.uk"
> />
> <input type="hidden" name="template" value="default" />
> <input type="submit" value="Search" />
> </form>
>
>
To fix:
<form action="/cgi-sys/entropysearch.cgi" class="search">
<p>
<!-- elements below need to be contain in block element -->
<img src="images/search.gif" alt="search" width="70" height="13">
<input type="text" name="query" value="">
<input type="hidden" name="user" value="dunmowka">
<input type="hidden" name="basehref" value="http://dunmowkarate.co.uk">
<input type="hidden" name="template" value="default">
<input type="submit" value="Search">
</p>
</form>
1. No 'target' on 'form'
2. '<element />' on single tag elements for XHTML not HTML
3. IMG and INPUT elements need to be contained withing block element,
e.g., P, DIV, PRE, H# ADDRESS
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|