Introduction: HTML Google Search Engine

Have you wanted to make a search engine without that Google CSE where you have to pay money to get even decent search quality? Well, here you go! Just some simple coding and there you go!

Step 1: Create the File

I am using windows so I:

1: right click the desktop

2: hover your cursor over New...

3: click Text Document

4: Type whatever name you want then hit the Enter key.

5: Double click the file

6: click File then Save As...

7: At the end, (the file extension) remove the .txt and type .html or .htm and click Save.

8: Close Notepad

9: Hover over Open With... and choose Choose Another App...

10: If Notepad appears, click that and skip step 11. If it does not, Click More Apps and if it appears there, skip step 11. If it does not, click Look for another app on this PC... In the text box at the top, click it and type "C:\Windows\System32\notepad.exe" and hit enter.

Step 2: Type the Code.

Type this code:

<input type="text" onchange="c = this.value;" id="a" />

<button onclick="search();">Search</button>

<script>

var c = a.value;

function search() {

  var query = "http://google.com/search?q=" + c;

  window.open(query, '_blank')

}

</script>

Step 3: Test It!

Click File then Save.

Double-click the file and type in the text box what you want to search then click Search.

You have got a Google search engine!

If there is any issues, comment it.