Google Answers Logo
View Question
 
Q: HTLM language for defaul google search ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: HTLM language for defaul google search
Category: Computers > Software
Asked by: kushtiqa-ga
List Price: $25.00
Posted: 13 Feb 2004 01:44 PST
Expires: 14 Mar 2004 01:44 PST
Question ID: 306379
Hello,
I have a search string which I would like to have default to google. 
For example.  When the web reader see the icon "World Politics", they would
depress the icon and a "safe" google search would be automatically effected
and they would see the results as a normal google page.  What exactly
would I write this into my page ( I use HTML notepad.  Thank you.
Answer  
Subject: Re: HTLM language for defaul google search
Answered By: robertskelton-ga on 13 Feb 2004 13:39 PST
Rated:5 out of 5 stars
 
Hi there,

The HTML to use is as follows:

<a href="://www.google.com/search?safe=active&q=%22World+Politics%22"><img
src="locationoftheimage.ext" alt="World Politics"></a>

Breakdown of the HTML used
--------------------------
<a href=""></a> is the normal HTML code for a link
http://www.htmlhelp.com/reference/html40/special/a.html

://www.google.com/search?safe=active&q=%22World+Politics%22"

safe=active - tells Google to filter the results using safe search
q=%22World+Politics%22 - is the search phrase
%22 - stands for for a double quote

<img src="locationoftheimage.ext"> is the normal HTML code for an
image with a filename of locationoftheimage.ext. Because it is nested
with the link code, clicking on the image will take you to the Google
link.
http://www.htmlhelp.com/reference/html40/special/img.html

alt="World Politics" - these days it is expected to provide a text
description of an image. It will be seen when a visitor moves their
mouse over the image, or in place of the image for anyone using a
text-only browser.

Different queries
-----------------
To turn off "safe search", just remove safe=active& from the URL

To search for two keywords, not as a phrase, change

q=%22World+Politics%22

to

q=World+Politics

A single word query looks like this:
q=widgets

A four word query looks like:
q=widgets+thingies+stuff+gadgets


If any of the above is unclear, or if you need further assistance on
this topic, please do not hestitate to ask for a clarification.


Best wishes,
robertskelton-ga
kushtiqa-ga rated this answer:5 out of 5 stars
Exaclty what I needed...  Thank you.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy