The Crouching-Tiger-Hidden-Dragon Algorithm
for adding textual WaterMark to an HTML document

The main idea is to hide characters a[i] of the WaterMark (which is supposed to be a short string of length n) in either image tags, or blank spaces, or both, depending upon the HTML document and the Key.
CTHD(Key, a, n)
{ Using the Key, determine a unique way to insert
  the n characters using the following techniques:

  Crouching-Tiger-Space:
  Find the first place in the document that can be uniquely
  identified and arbitrary number of spaces can be inserted at will.
  For example, one place is right after < /title > tag, another
  place is right after < body > tag, and so on.
  Insert a blank line with n[i] blank spaces followed by a line return,
  where n[i] is the alphabetical position of a[i].
  
  Hidden-Dragon-Image:
  If there is IMG tag and SRC is set to image.type and
  ALT is not set, then we can add ALT="imagex[i].type"
  where x[i] is the next character in the WaterMark.
}
The following is a reference on watermarking for text: http://www.compris.com/TextMark/en/