• My domain is https://fire-fly.net and I am trying to make my site Valid XHTML 1.1. The only thing from stopping me is the wordpress search form.

    <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <div>
    <input type="text" name="s" id="s" size="15" />
    <input type="submit" value="<?php _e('Search'); ?>" />
    </div>
    </form>

    Validation:
    # Error Line 251 column 135: document type does not allow element “input” here; missing one of “ins”, “del”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “p”, “div”, “address”, “fieldset” start-tag.

    …=”1db4c8b4c815a7f16335c5273809131a” />

    Any help would be grately appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Did you try the fieldset tag? You can style it in the css….

    Thread Starter mayreee

    (@mayreee)

    Tried that and it didn’t work

    From what I see in your code..

    try putting

    <div class="center">

    after your

    <form id="searchform" method="get" action="/index.php">

    and your ending tag before </form>

    Thread Starter mayreee

    (@mayreee)

    Okay, sorry if this is a stupid question, but I don’t see this at all in my HTML and it is what is causing the problem:

    <input type="hidden" name="PHPSESSID" value="e89363766bfb929a188fb876568d318c" />

    What is cauing that?

    This is the whole code according to WC3:

    <form id="searchform" method="get" action="/index.php"><input type="hidden" name="PHPSESSID" value="e89363766bfb929a188fb876568d318c" />
    <fieldset><input type="hidden" name="PHPSESSID" value="e89363766bfb929a188fb876568d318c" />
    <input type="text" name="s" id="s" size="15" />
    <input type="submit" value="Search" />
    </fieldset>
    </form>

    This is what is in my HTML:

    <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    <fieldset>
    <input type="text" name="s" id="s" size="15" />
    <input type="submit" value="<?php _e('Search'); ?>" />
    </fieldset>
    </form>

    Thread Starter mayreee

    (@mayreee)

    Thanks everyone! It was StatTraq that was causing the error in the search form.

    I *think* that may come from one of the core code files. Not sure….

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search Form not Valid XHTML’ is closed to new replies.