From The Guardian:
The earliest copies of the Qur’an were written in a script called Kufic Arabic, which had no vowel signs. It was not until the rule of the Umayyad Caliph ‘Abd al-Malik (685-705) that the first written version of the Qur’an with diacritics was produced. Seven different ways of reciting the Qur’an were also fixed, but that occurred still later, ca 934 CE. The same seven forms of Qur’an recitation have remained a canonical standard ever since.
Revelations are sorted out into chapters and verses, and the causes of each revelation provide context for its content. The number of revelations exceeds 200. They came to the Prophet Muhammad via a divine mediary (the Archangel Gabriel) between 610 and 632 CE. They are now arranged in 114 chapters. All but one begin by invoking God’s Name, then qualify the Name as at once Compassion and Compassionate: “In the Name of God, Full of Compassion, Ever Compassionate”. Different people close to the Prophet Muhammad heard these revelations as he uttered them. They remembered the words and repeated them orally. A few wrote them down. In all they total at least 6,219 verses. The contents of the surahs (chapters) and ayat (verses) are informed by the causes of revelation – that is, by events and circumstances that marked the Prophet’s life and the early Muslim community.