Charlotte's Web is set almost entirely in Wilbur the pig's pen at Homer Zuckerman's farm. This book focuses on the unique relationship between Wilbur and the peculiarly literate spider Charlotte, who builds a web over the pig pen.
Wilbur befriends Charlotte and other barnyard animals but panics when he finds he's slated for slaughter the next spring. Aided by the rat Templeton, Charlotte seeks out words to weave in her web to describe the pig. The farmer Zuckerman, upon seeing these words, is immediately impressed with his miraculous pig and decides to enter him in the county fair instead of slaughtering him.
After several scenes at the fair, the setting returns to Wilbur's pen, where Charlotte dies. However, she has had children, and three of them stay to keep Wilbur company in his retirement.