WordPress.org

Ready to get started?Download WordPress

Forums

Search form (4 posts)

  1. thelasian
    Member
    Posted 9 years ago #

    Can someone please explain the search function template to me, and what each line does? I am sorta newbie at html and especially this sort of stuff.
    For example:
    What does <"label for="s"> do?
    What does <?php_e('Search:')?> do?

    What portion of this stuff can I just eliminate?

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

  • NuclearMoose
    Member
    Posted 9 years ago #

    http://www.w3.org/TR/REC-html40/interact/forms.html

    What portion can you eliminate? Depends. If you want the search form, then none of it. If you don't want the search form at all, then all of it.

  • Anonymous
    Member
    Posted 9 years ago #

    Well, that's not strictly true. The form doesn't HAVE to be in a li, unless it happens to be enclosed by an ul, and the divs are purely presentational. 'Label' is needed for validation and accessibility, but the form itself will work without it. All the other stuff is indispensible.

  • thelasian
    Member
    Posted 9 years ago #

    I have noticed that removing the LI somehow makes the "highlite" plugin not work.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.