PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

validation output errors xhtml1-strict

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • validation output errors xhtml1-strict

    Hello, I'm getting the following validation errors in my xhtml1-strict documents:

    Code:
    Line 43, Column 49: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
    <input type="text" name="zoom_query" size="20" />
    ✉
    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
    The code I have on the pages for the search box is:

    Code:
    <div id="searchbox">
    	<form method="get" action="mysite.com/search-site/search.php">
    <input type="text" name="zoom_query" size="20" />
    <input type="submit" value="Search" />
    </form>
    </div>
    Is there any way to prevent these errors?

  • #2
    What you currently have qualifies as XHTML 1.0 Transitional standard.

    XHTML 1.0 Strict requires input tags to be within fieldset tags, or p tags, etc. Lots of details on this online.

    Our built-in support is for Transitional (which is alot more practical with various things on the web), so you will have to change some things to make it validate as Strict.

    Easiest way to fix the problem is to change your DOCTYPE/validation to Transitional (as it originally was by default).
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Okay, thanks, I can't easily change the doctype but I'll see what I can do with the input tags. At the end of the day it isn't critical if the tags don't validate.

      Comment


      • #4
        PS just wrapping the input tags within div tags seems to have done the trick.

        Comment

        Working...
        X