HTML Search Box
On this page I'll show the 4 most common search box examples in use today. The HTML search box code is included so that you can easily use these examples to build a search form on your website.
The search bar for a website is typically located on the upper right side of the page so I've added a float right style and the search box itself generally follows a style like one of these four search examples listed below.
These are mainly visual examples, you'll need to hook them up to a search engine to process the search queries. You can set the search form method parameter to use whatever script you want.
HTML Search Box Example
Standard Search Bar with some Basic CSS Style Enhancements
I've eliminated the bevel, added a gradient, rounded some corners so that the text input box and search button form one nice styled package together. The submit button also has a nice little subtle color change on hover. The rounded corners and etc for this search bar rely on CSS3 and so if you're using an old browser the appearance won't be exactly identical as something more modern but it will be a fully functional fallback rendering.
Grab the search form html code below. I have included both the necessary html and the css in a whole page example that you can easily use.
Placeholder Text in Search Box
This example is very similar to the code above but here we also have some default text in the search box and this text will disappear once a user clicks in to enter text for their own search.
jQuery search placeholder text version