Easy Code to Add Yahoo Site Search to Your Website
By Stephen Bucaro
If your website consists of more than just a few pages, it's important to have
a way for your visitors to search your website. There are several ways you can
accomplish this. One way is to use a pay site search company which will index
your site's contents and provide you code for a search box. This may give you
more control over the results returned for a specific search term or phrase.
The down side is, you have to pay.
Another way to put site search to your website is to create your own index of
your site's contents and write your own search program. This gives you complete
control over the results returned. The down side, it's very complicated to write
code that can create an index and return results from that index based upon
a specific search term or phrase.
Another way is to simply put the code for a search box that calls the search
program of one of the major search providers, like Yahoo! Yahoo! was one of the
earliest Internet search sites, created in January 1995. Because each site in its
index was classified by actual humans, it returned very accurate results.
Yahoo! was not the first Internet index, in fact there where many, and they
all used humans to check websites and they all listed them in Hierarchically Organized
format. That's why the name yahoo! is said to stand for "Yet Another Hierarchically
However, the Internet grew too big too fast for actual humans to keep up with.
Then Larry Page and Sergey Brin created a program called a robot to crawl the
Internet and automate the indexing. This didn't return the same high quality
results as human indexed Yahoo!, but it returned a lot more results. Eventually
most people switched to Google.
Today Yahoo! uses a robot just like all modern search engines, and it shares
results with Microsoft's Bing. Yahoo! is very powerful, so if you're anti-Google,
you may choose to implement a Yahoo! search box. The down side is that Yahoo!
is in the search business to make money, so there will be some not from you're
website results returned with your sites results.
The code for Yahoo! site search is shown below, just paste this code into the
desired location on your website.
<form method="get" action="http://search.yahoo.com/search">
<span style="font-family:verdana; color:#40009b; font-weight:bold">YAHOO!</span>
<input type="text" name="p" size="30" maxlength="255" />
<input type="hidden" name="fr" value="yscpb" />
<input type="submit" value="Search" /><br />
<input type="hidden" name="vs" value="http://bucarotechelp.com" checked="checked" />
One thing you'll want to do is replace the link "http://bucarotechelp.com" with
the URL of your website (unless you want to post a form to search my website.
In that case thank you.) And just above that you may want to replace the
"Search Site" with Search (the name of your website). Or just leave it "Search Site".
After you make those modifications, type in a search term or phrase and give
it a test. You can's get the services of a powerful search engine on your website
any easier or cheaper than this.
More HTML Code:
• HTML5 role Attribute
• Form Input Labels
• Use an Image as a Form Submit Button
• Code For a Basic 2-Column Fluid Webpage Layout
• Divide a Table Into Head (thead), Body (tbody), and Footer (tfoot) Sections
• How to Debug HTML
• HTML List Basics
• Easy Code to Add Google Site Search to Your Website
• Easy Form Design
• HTML Frames Basics