In religion and mythology
The temple town of Sri Kalahasti (also known as Dakshina Kailasa) Andhra Pradesh is named after S ri (spider) Kala (serpent) and Hasti (elephant). According to legend, a spider called Sri, serpent named Kala and the elephant Hasti were ardent devotees of Shiva. The spider worshipped the Linga by spinning a web over it, the snake placed a gem over it and the elephant washed it with water. Daily, each replaced the others' offerings with its own. One day, the snake became angry and bit the elephant, which died and fell on the snake and spider, crushing both to death. Shiva blessed all three with immortality. The main Linga is shaped like the trunk of an elephant, with tusks on either side. There is a spider-like figure below the Linga while the Linga resembles a snake from above.
The spider was actually Vishwakarma's (architect of the devaganas ) son Urnanabha. He was replicating Brahma - the creator's job and an annoyed Brahma cursed him to become a spider.
Repentant at what he has done, Urnanabha prayed to Lord Brahma for his mercy. A pacified Lord Brahma indicated that Urnanabha would be freed from his curse when he, as a spider, served Lord Siva in the Bilwaka grove in Dakshin Kailash. Urnanabha thus began his life as a spider in the Bilwaka grove yearning for Lord Siva's grace. One day, a devotee of Lord Siva was plucking leaves into a basket, for worship, from the tree where the spider was living. He went in to the river Suvarnamukhi to purify himself keeping the basket on the banks. When he came back to pick his basket of leaves, drops of water from his body fell on the leaf on which the spider was hiding. Immediately, he was reminded of the events in his previous birth that led to his present state. As the devotee was uttering each of the thousand names of Lord Siva and offering a leaf, the leaf behind which the spider was hiding, fell on the linga, and the spider came into contact with the linga. The spider there upon climbed up a nearby tree.
As if the sculptor in Urnanabha, born as a spider, manifested again, the web was built to shield the linga from sun's rays. The spider stayed in the web, close to the Lord, and considered it its fortune to serve the Lord in such a manner. While the spider was thus serving the Lord, an incident took place as if to test the spider's devotion. The flame from one of the lamps close to the Linga, started rising. In his concern to protect the Lord, the spider, simpleton that he was, rushed down towards the flame. The Lord, pleased with the total devotion shown by the spider, appeared in front of the spider and asked him to seek a boon. Overwhelmed, the spider said that he desired to be liberated. The Lord granted his request, and as the legend goes, said to the spider, "As you have served me here as a spider-devotee, the name of this temple shall have 'Sri' as a suffix from now on". Even today, the web-like form seen close to the base of the linga is believed to be an image of what the spider-devotee had weaved.
(Legend source : http://www.srikalahasthi.com/Myths.asp)