How to Make Google Gadgets

  • Print this article
How to Make Google Gadgets thumbnail
The Google API is designed to simplify the process of creating Google gadgets.

Google gadgets are small applications created with XML, HTML and JavaScript. You can also use Adobe Flash or Microsoft Silverlight to make the gadgets interact with your users. Gadgets work on virtually any website and platform, and creating them is not as difficult as it sounds, due to the Google gadgets' Application Programming Interface (API). However, making a Google gadget requires HTML and XML coding experience.

Things You'll Need

  • Google account
Show More

Instructions

    • 1

      Log into your Google account, navigate to the "Development" section and click the "Google Gadgets Editor" link. Go to "File" and select "New" to start creating a new gadget. You will see a large text box labeled "Edit," where you can write the code.

    • 2

      Start the new gadget the same way you would start an XML file. Here is the first line of a gadget:

      <?xml version="1.0" encoding="UTF-8" ?>

    • 3

      Add this line to specify that the XML file contains a Google gadget:

      <Module>

    • 4

      Add the gadget's title, description and author by using the "<ModulePrefs>" parameter. Here is an example:

      <ModulePrefs title="Hello World" description="Short description of the gadget" author="you" />

    • 5

      Add this line to indicate the gadget's content type is HTML:

      <Content type="html">

    • 6

      Add the <![CDATA[ ]]> section containing the gadget's code. Here is an example CDATA section that prints the message "Hello, world!":

      <![CDATA[
      Hello, world!
      ]]>

      The CDATA section contains the code that makes the gadget work. The code inside the structure is not parsed by the XML parser. You can use HTML and JavaScript inside the structure.

    • 7

      Close the "Content" section with this code:

      </Content>

    • 8

      Close the gadget definition with this code:

      </Module>

      The finished gadget looks like this:

      <?xml version="1.0" encoding="UTF-8" ?>
      <Module>
      <ModulePrefs title="Hello World" description="Short description of the gadget" author="you" />
      <Content type="html">
      <![CDATA[
      Hello, world!
      ]]>
      </Content>
      </Module>

    • 9

      Go to "File" and select "Save" to compile and save your gadget. Use it on any website that supports gadgets.

Related Searches

References

Resources

  • Photo Credit Goodshoot/Goodshoot/Getty Images

Comments

Related Ads

Featured
View Mobile Site