The term for a small house built in a tree for children to play in is a treehouse.
A treehouse is a small elevated structure supported by one or more trees, posts, or a combination of both. It may be a simple wooden platform with a railing or a fully enclosed miniature house with windows, a roof, stairs, and a play area. The key idea is its position above the ground among the branches.
Treehouses are often confused with tree dwellings, which are larger homes built in trees for shelter or permanent living. A playhouse, by contrast, can be built at ground level and does not need to involve a tree. Treehouses also require careful construction: attaching heavy loads directly to a living tree can damage it, so builders often use specialized supports and flexible connections.
Although elevated shelters have existed in many cultures, the modern backyard treehouse became especially popular as a recreational project for children and families.