An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to

November 11, 2009

CSS Injection in Google Docs Forms

Flemming Steffensen found an undocumented trick that lets you customize a Google Docs form by injecting CSS.

Let's assume that the URL of your form is:

You can add some new CSS rules as a value of the f parameter:;}body{font-size:14pt!important}.ss-q-title{color:green}

Here's the result.

The most important things to remember:

1. the value has to start with ;}
2. you need to use !important for some of the rules to override existing values
3. check the source code of the form to find the classes used by Google
4. this a trick that may no longer work in the future.

For more parameters that let you customize Google Docs forms, check this test page.


  1. Shame that "background" can't be modified, though.

  2. Eli, you can do background-color:red; or black or whatever, #000000 doesn't work.. why?

  3. Modifying 'background' works for me with !important:;}body{background:yellow%20!important}

    I think the reason # isn't working is because # is a special character in HTTP URLs which is used by the browser to jump to an anchor on the linked page. For instance:

  4. It will a be a great idea to implement such options in a web browser, like Firefox.

  5. @Angelo:

    Use rgb(red, green, blue) instead. For example:;}body{background:rgb(200,150,100)%20!important;}

  6. The background colour can be modified through the bc URL parameter, like this:

  7. You can change the background provided the color is specified in R, G and B values and not with a hex value starting with a # (which is filtered by the browser), such as this:

    ;}.ss-form-container{background:rgb(156,165,120) !important

    Additionally you can add an image this way:


  8. It looks great but...

    When the submit button is pressed, all formatting is gone.

    Is it possible to change the view of the confirmation

  9. Jan,

    At this moment I don't see any way it's possible to change the formResponce, nor restore the formatting when returning to the page (As allready mentioned on the trick test site). The trick with injecting css only allows to change the representation, not the actual contents.
    In order to preserve the formatting it will be nessary to find a way to inject javascript... Or some other secret parameter build into the embedform by the good Google folks.

  10. To use your own CSS file, for example:

    use "\" for special characters

    Insert this at the end of the url:

  11. Nicodicoco,

    Your comment made me realize how to also inject javascript.
    Check the details here:

  12. Sorry to inform you all, but it seems Google patched the &f parameter, rendering this hack utterly useless. :-(

    Hopefully they'll do more then just patching the forms, by adding those needed styling and redirection options that we all crave.



Note: Only a member of this blog may post a comment.