Spiders are skillful engineers, gifted with amazing planning skills and a material that allows them to precisely design rigorous and functional webs.

The material—spider silk—has chemical properties that make it lustrous, strong and light. It’s stronger than steel and has impressive tensile strength, meaning it can be stretched a lot before it snaps. Scientists have been trying for decades to decode exactly what gives the silk both strength and elasticity, but so far they have found only clues.

Any individual spider can make up to seven different types of silk, but most generally make four to five kinds, says Jonathan Coddington, director of the Global Genome Initiative and senior scientist at the Smithsonian’s National Museum of Natural History.

Spiders use their silk for several purposes, including web-building. That diversity is not hard to imagine, given that Earth hosts 45,749 species of spiders, according to the World Spider Catalog. The number is changing constantly with the frequent discovery of new species.

Why build webs? They serve as “pretty much offense and defense,” says Coddington. “If you’re going to live in a web, it’s going to be a defensive structure,” he says, noting that vibrations in the strands can alert the spiders to predators. Webs are also used to catch prey, says Coddington, whose research has focused in part on spider evolution and taxonomy.

Sometimes spiders eat their own webs when they are done with them, as a way to replenish the silk supply.

Spider silk is made of connected protein chains that help make it strong, along with unconnected areas that give it flexibility. It is produced in internal glands, moving from a soluble form to a hardened form and then spun into fiber by the spinnerets on the spider’s abdomen.

Spiders’ multiple spinnerets and eight legs come in handy for web-building. The architecture of a web is very species-specific, says Coddington. “If you show me a web, I can tell you what spider made it,” he says, adding that spiders “are opinionated” about where they will make a web. Some might be at home in the bottom of a paper cup, while others wouldn’t touch that space.

Most web-building happens under the cover of darkness.

The typical orb weaver spider (the group that’s most familiar to Americans) will build a planar orb web, suspended by seven guy lines attached to leaves, twigs, rocks, telephone poles or other surfaces. Hanging from a leaf or some other object, the spider must get its silk from that point to the other surfaces.

The spider starts by pulling silk from a gland with it fourth leg. The opposite fourth leg is used to pull out multiple strands of silk from about 20 additional silk glands, creating a balloon-like structure. The spider sits patiently, knowing that eventually a warm breeze will take up the balloon, which carries away the first line of silk.

Eventually the balloon's trailing silk strand snags—and, like an angler with a fish on the line, the spider can feel the hit. It tugs to make sure the silk strand is truly attached, then it pulls out new silk and attaches the strand to whatever it is perched on and starts gathering up the snagged strand, pulling itself towards the endpoint, all the while laying out new silk behind it. That new silk is the first planar line. The spider may do this 20 times, creating a network of dry (not sticky) silk lines arcing in all directions.

The spider then has to determine which of those lines constitute seven good attachment points—they must be in a plane and “distributed usefully around the circle the web will occupy,” says Coddington. The spider cuts away the 13 lines that it won't use. “Now that you have the seven attachments you need, you no longer need to touch the ground, leaves, twigs, anything ... you are in your own, arguably solipsistic, world.”

Then the spider starts to spin its web, a relatively simple and predictable process. It begins at the outside and works its way in, attaching segment by segment with its legs, creating concentric circles and ending with a center spiral of sticky silk that traps much-needed prey—all the energy invested in making the web depletes protein stores.

The sticky stuff merely immobilizes the prey. The coup de grâce comes from the spider’s jaws. “Most spiders attack with their teeth,” says Coddington. “They just wade in and bite the thing to death.” That’s a risky proposition, though, because the prey might not be entirely stuck.

A few families of spiders have developed an alternative mode of offense: the sticky-silk wrap attack. Those spiders lay a strand of sticky silk across the ground. When an insect crosses, the vibration alerts the spider, which then attacks, flicking lines of sticky, strong silk around the insect and wrapping it up until it is fully immobilized. The spider then moves in for the death bite. But this is more of a rarity than a rule in the spider world.

Many researchers are studying spider behavior and spider silk in the hopes of some day being able to farm the material or perhaps replicate it through genetic engineering. The silk could be used, for instance, to increase the strength of body armor, or to create skin grafts. “That would be a great thing for the human race,” says Coddington.

A handful of companies are currently invested in spider silk, including Ann Arbor, Michigan-based Kraig Biocraft Laboratories, a Swedish biotech firm, Spiber Technologies, and a German company, AMSilk, which says it has genetically engineered a protein that is similar to spider silk that is currently being used in shampoos and other cosmetics.

It's your turn to Ask Smithsonian.