A standard format for ebooks defined by the International Digital Publishing Forum (IDPF)
epub is a standard format for ebools defined by the International Digital Publishing Forum (IDPF)
The current standard is Epub 3.0 defined at http://idpf.org/epub/30 effective October 11, 2011.
The format defines the structure of the file and the items and their structure that must be in the file.
The basic structure is a zip file, this includes the book to be read which is a set of XHTML files and other resources. There is a package description which includes
Publication metadata — mechanisms for including and/or referencing metadata applicable to the entire Publication and particular resources within it.
A Publication manifest — identifies (via IRI) and describes (via MIME media type) the set of resources that collectively compose the Publication.
A spine — an ordered sequence of ID references to top-level resources in the manifest from which all other resources in the set can be reached or utilized. The spine defines the default reading order of the Publication.
Fallback chains — an optional means for Publications to define an ordered list of top-level resources that can be considered content equivalents that a Reading System can choose between for rendering.
Bindings — an optional means of associating script-based implementations with custom media types.