The codex (plural codices //) was the historical ancestor of the modern book. Instead of being composed of sheets of paper, it used sheets of vellum, papyrus, or other materials. The term codex is often used for ancient manuscript books, with handwritten contents. A codex, much like the modern book, is bound by stacking the pages and securing one set of edges by a variety of methods over the centuries, yet in a form analogous to modern bookbinding. Modern books are divided into paperback or softback and those bound with stiff boards, called hardbacks. Elaborate historical bindings are called treasure bindings. At least in the Western world, the main alternative to the paged codex format for a long document was the continuous scroll, which was the dominant form of document in the ancient world. Some codices are continuously folded like a concertina, in particular the Maya codices and Aztec codices, which are actually long sheets of paper or animal skin folded into pages.
The Ancient Romans developed the form from wax tablets. The gradual replacement of the scroll by the codex has been called the most important advance in book making before the invention of the printing press. The codex transformed the shape of the book itself, and offered a form that has lasted ever since. The spread of the codex is often associated with the rise of Christianity, which early on adopted the format for the Bible. First described by the 1st century AD Roman poet Martial, who praised its convenient use, the codex achieved numerical parity with the scroll around 300 AD, and had completely replaced it throughout what was by then a Christianized Greco-Roman world by the 6th century.