Collect the information you will need to cite the book. For most style guides, this includes the author's name, title, publisher's information, and year of publication. If you are citing a chapter or excerpt rather than an entire work, you will also need the chapter title and the page range you took the information from.
Note the URL you used to access the online book. Make sure it is a stable URL, that your readers can access it without needing any passwords or subscriptions, and that it is not garbled with a long string of machine-readable text. Try to find a more accessible copy if any of these present problems. If a clean public URL cannot be found, truncate the URL to the database you used to access the book.
Cite the book throughout your paper as you would a physical copy, using in-text citations or footnotes as your style guide directs.
Include the book in your bibliography. In most style guides, the entry for an online book is the same as for a physical book, with the addition of the book's URL, the date it was electronically published, the name of the site or database you used to access the book, and the date you last accessed the book.