Why does my LCD screen emit sound when displaying black-and-white lines?
The explanation by drivers99 is correct. Noise is generally coming from capacitors or from the AC to DC converter.

Do you remember the old style cameras? They had a flash that used to make a whining noise after every photo taken. That's the capacitor charging. Same thing with your monitor.

Why does it make that sound only in some patterns? Due to pixel overdrive. What happens is, when the pixel color changes from white to dark, the monitor supplies higher voltage so the LCD crystal changes state faster. You can see the oscilloscope photos from here http://www.tomshardware.com/reviews/viewsonic-overdrive-lcds,1042-8.html

The page you linked produces a series of fast changes, probably making the monitor overdrive a lot more than normal. Higher voltage means the AC to DC converter has to supply more power and the capacitors have to unload and reload more often, thus everything producing more of that whiny noise.

A static image can still make the monitor "work harder" due to the way it drives the pixels. Depending on the panel type, the logic behind the screen is different and can have some unfortunate worst-case arrangements. This also produces pixel-walk. Here's a page where they have some examples of such cases: http://www.lagom.nl/lcd-test/inversion.php

More information about pixel-walk here: http://www.openphotographyforums.com/forums/showthread.php?t=18552