Friday, 5 October 2007

HTML Code for searching your site with Google.

I had seen this done in many sites and to be honest I always thought of it as a fancy trick for showing off HTML skills. Lately while using Steve Muench's Blog I realized that this little HTML form turns out to be of ultimate use. Then I said ok let's do it and ended up looking at HTML code from various sites....Finally I ended up with the following solution, that you can copy at use as is, Just replacing my site with yours.


<form action="http://www.google.com/search" method="get">
    <table border="0" align="center">
        <tr>
            <td>
                <input maxlength="255" value="" name="q" size="31" type="text"/>
                <input value="Google Search" type="submit"/>
            </td>
        </tr>
        <tr>
            <td>
                <input value="" name="sitesearch" type="radio"/>
                The Web
                <input checked value="abakalidis.blogspot.com" name="sitesearch" type="radio"/>
                This Blog
            </td>
        </tr>
    </table>
</form>

Thank you Kate for the messy HTML color syntax.:-)

No comments :