After adding the above code in an empty page, you will have a search box that will look like this. In addition, the form tells the browser to send a HTTP GET to the server endpoint at https://www.techcoil.com/search when the user submits this form. But it this post I'll guide you on how to create an input box or TextBox with search icon in HTML … CustomSearchControl();cse.draw(‘cse’);}, true); In this tutorial, I’d like to explore how you can embellish a simple search form. Type in the body of you HTML. I set the hidden property and I am also calling a function on a button click. Removing the border for the search text and search button makes them look alike and adding a margin-left of -5px makes them appear as one entity. nothing will be submitted. Display search form. The most common name for search inputs is q. In this example, we’ll create a simple search box that requires textual input and includes a search button on the right. #search_text is floated to the left and is provided with a green background which animates to a lighter shade on hover. Here are some wonderful buttons I've picked, which I think are cool and practical and can be used in your web projects. By the search box user can search the content. < form action = "search" method = "GET" > Search Term: < input type = "text" name = "search_query" > < input type = "submit" value = "Search" > < button type = "submit" name = "search" value = "search_button" > Search button > form > Free HTML code samples, in-depth HTML tutorials, and HTML resources. . disabled: Disables the button. It uses a search icon as its background which is positioned at its center. If you have a white background, the text box will be invisible as there is no border at all. You can retrieve this using the HTMLInputElement.valueproperty in JavaScript. . – Johan Tidén Oct 20 '16 at 8:19. In our previous article, we did design a nice & beautiful expanding search bar with jQuery and CSS3. Below is the HTML code for setting up simple search UI, We’ll focus on the search text box with the class “search-input” and the button with the class “search-button”, The trick is to have no borders at all and have a negative margin, Below is the CSS code for making the button appear within the search text box. Within the enclosing box, there is a HTML form that is marked with the role of being a search form. Although quite basic, this search box can be easily modified to fit different websites.Before we can create the CSS, we need to build our HTML.Add the following code in a new HTML document. HTML for SEARCH BAR -->