Who invented the sport rugby?

Legend has it that Rugby was invented at Rugby School in the town of Rugby, Warwickshire, England in 1823 by William Webb Ellis. Whilst playing football he picked the ball up and ran with it.