jump to contentsacramento state - leadership begins here  
sac state homeadmissionsabout sac stategiving a giftsite indexcontact us

Tutorials - Adding a Search Function to Your Web Page

To add a search form like the one below to your website, insert the code on this page into your page at the desired location and then replace the URL with the top level domain name of your unit. The University utilizes the Google search engine to index its Web pages.


Step 1

and paste it into the <body> section of your HTML document where you want to insert the search option.

Step 2

Change the references to the search label and Web address directory from above, which are in bold below, with a grey background.

<label for="sacstatesearchbox"><strong>Search Web Central</strong></label>
<input type="text" name="q" id="sacstatesearchbox" title="Search Web Central" maxlength="256" />

<input type="hidden" value="inurl:www.csus.edu/web" name="hq" />

Step 3

Ensure that your pages are searched thoroughly by the Google search engine. Below are some tips and reminders to help you.

  • Use <meta> tags in each HTML page. The meta tag generator can be used to add keywords and descriptions to your HTML that will help the Google search engine, and other engines, locate your pages. For more information on how the search engine treats these tags, see the Tagging for Search Engines page.
  • Google can only find your Web page if it is linked from another page that is already in the Google index (for example, a link to your page(s) from a college or department site, or from one of the campus directories).

last reviewed: January 29, 2008