ePUB is designed for "reflowable" content, which means that the layout of an ePUB publication can be adjusted for a particular display mode or device. For compatibility, ePUB also supports fixed-layout content.
ePUB uses XHTML 1.1 to represent the content of the book. Styling and layout are performed using style sheets which conform to the CSS 2.0 standard, with some additional custom properties. PNG, JPEG, GIF, and SVG formats are supported for images.
An example ePUB book might contain the following skeleton XHTML code:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <title>Pride and Prejudice</title> <link rel="stylesheet" href="/jargon/e/css/main.css" type="text/css" /> </head> <body> ... </body> </html>
ePUB books support DRM components, but do not require it.