Add Google Search Box in your Website

Hello Friends,
Today I am interested to teach you, how to add google search box in your website. It is very easy way to add a google search box in your web.  Let’s go-

Create a HTML file and give your desire name. I want to give the file name search.html and code are in below-

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>

<body>

</body>

</html>

 

These are the basic code of HTML. Now I want to add the search code into body section. The code are-

<form method=”get” action=”http://www.google.com/search”&gt;
<div style=”border:1px solid black;padding:4px;width:20em;”>
<table border=”0″ align=”center” cellpadding=”0″>
<tr>
<td>
<input type=”text” name=”q” size=”25″ maxlength=”255″ value=”” />
<input type=”submit” value=”Google Search” />
</td>
</tr>
<tr>
<td align=”center” style=”font-size:75%”>
<input type=”radio” name=”sitesearch” value=”” />The Web
<input type=”radio” name=”sitesearch” value=”yoursite.com” checked /> Only Your Site<br />
</td>
</tr>
</table>
</div>
</form>

 

Now save your file and browse your file. You will get the search box. That’s enough today’s tutorial. The whole code are in below-

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>

<body>

<form method=”get” action=”http://www.google.com/search”&gt;
<div style=”border:1px solid black;padding:4px;width:20em;”>
<table border=”0″ align=”center” cellpadding=”0″>
<tr>
<td>
<input type=”text” name=”q” size=”25″ maxlength=”255″ value=”” />
<input type=”submit” value=”Google Search” />
</td>
</tr>
<tr>
<td align=”center” style=”font-size:75%”>
<input type=”radio” name=”sitesearch” value=”” />The Web
<input type=”radio” name=”sitesearch” value=”yoursite.com” checked /> Only Your Site<br />
</td>
</tr>
</table>
</div>
</form>

 </body>

</html>

Thanks for reading my article.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s