A capsule made of fibrous connective tissue that is firmly attached to the periosteum of the bone at the edge of the joint cartilage. The joint capsule completely envelopes the joint and is lined by a membrane (synovial membane) which secretes the viscous joint fluid (synovial fluid).