Skip to content

Latest commit

 

History

History
 
 

19-search

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Search Form

Forms are used everywhere on the web. One of the simplest forms you will find is a search form. In this exercise, you will create a form to search on Google. Follow the steps below to create your form.

  1. Edit the index.html file. Find the line that says <p>Delete this line and add your form.</p>. Delete it.
  2. Add a <form> to the same line where you deleted the text. The <form> should have two attributes: a method attribute that is GET and an action attribute that is https://www.google.com/search.
  3. Inside of the <form> create an <input> field. The type attribute should be text and the name attribute should be q.

If you've done this correctly, you should be able to type into the field and hit ENTER and it will show you Google search results!