There are no exact set of rules for creating a search box for a website. But it’s always better if you adhere to the web conventions, when you design the search box so it will increase the user experience of your website. Following is a set of tips to create a good search box.
1. First of all, it needs to be a box.
2. Do not use multiline textbox.
3. Fire the search event when user is focusing the search box and press enter.
4. At the right hand corner, add an image of a magnificant glass and allow users to search when click on that ImageButton.
5. Add a watermark text inside the textbox saying what you can search. Make it dissapear onFocus and make it reappear onBlur