Spider

Spiders are common hostile mobs.

Natural generation
Spiders spawn in 3x3x2 space on solid blocks (centered on the middle block) at a light level of 7 or less. The top blocks can be transparent, but not solid.

In Pocket Edition, leaves can spawn spiders, provided that there are the same conditions as above.

Monster spawners
Monster spawners in dungeons have a 25% chance of being a spider spawner.

Behavior
A spider measures 1.5 x 1.5 x 1 blocks of size.

Spiders are hostile as long as the light level immediately around them is 9 or less; otherwise they won't attack unless a player attacks first. Hostile spiders will continue to chase the player even if they are exposed to well-lit locations. Conversely, a spider won't become hostile around a player when roaming in high light, but if it wanders into a moderately shaded area it will turn hostile and remain that way. If a spider sustains damage from a source other than the player, such as falling, its hostility will be reset.

Spiders can climb up over walls and other obstacles. Spiders can take advantage of their climbing ability through a unique AI system. Note that for this to work, the player must hit the spider first, causing it to see the player through blocks (this occurs with all mobs). If the spider is chasing the player, and there is a possible horizontal path that it can take to get to the player, they will immediately take it, regardless of the situation. However, if the spider cannot find an ideal path to the player in this condition (for example, if the player enters a house, or the spider notices the player while they are standing on a raised platform such as a roof), it will get as close as it can to the player's position from the outside (if in a house) or bottom (if on a cliff), and proceed to climb the wall vertically until it gets to the top, even if it loses its aggression towards the player. This behavior allows spiders to continue chasing players after they climb a ladder, block pillar, or enter a shelter, especially with no roof. Additionally, when a spider loses its aggression on the player, it will continue moving forward blindly for about two seconds. This behavior causes the spider to climb up any walls in its path, and is especially useful if the player did not hit the spider at all while moving into cover, causing the spider to lose track of the player.

Spiders do not turn sideways when climbing up walls and cannot climb along the tops of ceilings. If there are blocks around the top of a wall, a spider will not be able to climb to the top and will instead fall. Spiders seem to be oblivious to cactus damage.

While not poisonous themselves, spiders are unaffected by poison status effect.

Spiders will often jump around when attacking, making them a moving target and harder to hit. In the Pocket Edition, spiders move at a pace slightly slower than the player's walking speed.

Variants
There is a 1% chance that a spider will spawn with a Skeleton on its back, forming the dreaded Spider Jockey. The Skeleton's ability to fire arrows combined with the speed, leaping, and wall-climbing of the Spider makes this a very dangerous opponent.

On Hard difficulty and on a full moon, spiders have a 10% chance of spawning with a single beneficial status effect. This effect can be Swiftness, Strength, Regeneration or Invisibility, and has an essentially infinite duration.

Drops
Spiders drop 0-2 string. If killed by a player, it also has a $1/3$ chance to drop a spider eye.

Trivia

 * You can still see spider's eyes when a spider is hit with a Potion of Invisibility.
 * A spider can jump sideways or backwards.
 * They appear to be based on real life jumping spiders due to their eye pattern and the fact that they pounce to attack. However, most jumping spiders hunt in the day.
 * Spiders can travel through a space that is $1 1/2$ blocks wide. This can happen when glass panes or iron bars are part of a wall composed mostly of solid blocks.
 * Spider's footstep noises get some special handling: They have a lower chance than other mobs to make a noise when they walk on a block, but they are wider, and so touch more blocks at once. The result comes out about even with other mobs.
 * At close range, Spiders occasionally pounce their attackers instead of being knocked back.
 * If the water a Spider is swimming in is only 1 block deep, they may pounce nearby enemies upon touching the submerged floor.
 * A spider will actually follow players regardless of y axis. That means if a player is above ground and a spider is underground, it will still 'see' that player.
 * Spiders do not have a 'hurt' sound file; they simply play one of their 'idle' files.
 * Spiders, along with cave spiders and silverfish, instead of falling on their side upon death, they do a flip and land on their backs.