A carpet is a textile floor covering typically consisting of an upper layer of pile attached to a backing. The pile was traditionally made from wool, but since the 20th century synthetic fibers such as polypropylene, nylon, or polyester have often been used, as these fibers are less expensive than wool. The pile usually consists of twisted tufts that are typically heat-treated to maintain their structure. The term carpet is often used in a similar context to the term rug, but rugs are typically considered to be smaller than a room and not attached to the floor.