How to Create a Search Button for My Website

How to Create a Search Button for My Website

Creating a search button on your website is very easy. Major Internet search engine companies allow you to insert code on your website to power your local searches. It's as simple as copy and paste. The search button can be configured to offer searches on any of your domains, as well as the Internet, and it's all free! Familiarity with HTML is helpful for adding a search button, but not required.

Instructions

Find Free Search Engine Code

    1

    Find a search engine company on the Internet that offers free code to add a search button to your own site. Start with the big names first. The example shown here uses the Yahoo search engine. Google is another popular option.

    2
    Yahoo's free search button offer

    Navigate with your web browser to the web page that offers the search engine code for your website (see Resources). Yahoo has a page with step-by-step directions on how to add the code. Other companies (like Google) may require that you register with them and go through a series of setup screens to access the code.

    3
    Search code to copy

    Copy the HTML code the search engine site tells you to copy. Yahoo offers four different styles of search buttons for your website. Styles 2 and 4 offer the option to search your website as well as the Internet. Copy the code for the style you like best.

Add the Search Engine Code to Your Website

    4

    Open your web editing software and view the HTML code for the page where you want to add the search button.

    5
    Search code pasted on page

    Click your mouse at the location on the page you want the search button to appear and paste the HTML code you copied at this location.

    6

    Edit the section of code that says "YOUR SITE DOMAIN" and replace it with your domain name, including the htttp:// prefix.

    7

    Insert the attribute "checked" for the radio button that corresponds to "Search This Site" so that searching your site is always the default for the search button. The code in the < > brackets will look like: input type="radio" name="vs" style="vertical-align: middle" value="www.YOUR_DOMAIN.com" checked.

    8

    Save your changes, upload your page to your web server, and preview it in your web browser to test.

Blog Archive