Once the main text has been written, you edit it. Editing means breaking text into sub-documents; pointing out connections to other texts; making sure the document as a whole is in good shape; adding indices and outlines. Editing doesn't necessarily happen after the first text has been written - I mix those stages all the time - but it deserves to be thought of as an independent discipline, because the problems it deals with are different. Most of what people do on the World Wide Web is really editing, not writing.
Technische Universität Berlin. Articles>Web Design>Editing>Writing