Answers.Body: <p>This appears to be a distinction between EPUB 2 and EPUB 3. EPUB 2 content files are expected to have .HTML extensions. EPUB 3 content files are expected to have .XHMTL extensions. The same book converted to both EPUB 2 and 3, passes as perfect with HTML extensions in EPUB 2, but does yield warnings (NOT errors, and still works) with HTML extensions for EPUB 3. Simply changing the extensions from HTML to XHTML, with the same internal file content, prevents the warnings.</p>
  <p>Here's an example report on an EPUB 3 with HTML extensions from EPUB check:</p>
  <p><a href="https://i.sstatic.net/Xod1b.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Xod1b.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-02T21:03:25.157Z
Answers.LastActivityDate: 2023-06-02T21:03:25.157Z
Answers.UserDisplayName: GraniteStateColin
Body: <p>Why are ePub content files, which (as I understand) are to be interpreted as XHTML, saved with a .html file extension? I realize that they are interpreted correctly by readers in accordance with their mime type (application/xhtml+xml) which is stored in the book's manifest. My question is why are they not given their correct file extension, so that if I were to double click the file it would be displayed appropriately as XHTML and not as HTML.</p>
  
  <p><a href="https://pressbooks.com/sample-books/" rel="nofollow noreferrer">This ePub</a>: The Metamorphosis, by Franz Kafka (Jackson Theme) is an example.
  Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-17T07:15:21.967Z
Comments.Text: _Why are epub .xhtml files saved as .html?_ – What exactly do you mean by _are saved_? By some app? It would help to describe your workflow a bit. If you mean by the PressBooks app, you could ask their devs.
Comments.UserDisplayName: Honza Hejzl
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-17T07:21:48.607Z
Comments.Text: I think the xhtml extension is just optional and not mandatory for xhtml files (they are simply html coded according to XML standards). However, it is more common to use the extension inside ePubs.
Comments.UserDisplayName: Honza Hejzl
Tags: <epub><html>
Title: Why are epub .xhtml files saved as .html?
UserDisplayName: Trever Thompson
ThreadText: # Why are epub .xhtml files saved as .html?
  
  (Asked by: username_0 on 2018-04-15)
  
  Why are ePub content files, which (as I understand) are to be interpreted as XHTML, saved with a .html file extension? I realize that they are interpreted correctly by readers in accordance with their mime type (application/xhtml+xml) which is stored in the book's manifest. My question is why are they not given their correct file extension, so that if I were to double click the file it would be displayed appropriately as XHTML and not as HTML.
  
  [This ePub](https://pressbooks.com/sample-books/): The Metamorphosis, by Franz Kafka (Jackson Theme) is an example.
  Thanks
  
  **Tags:** epub, html
  
  > **Comments:**
  > **username_1**: _Why are epub .xhtml files saved as .html?_ – What exactly do you mean by _are saved_? By some app? It would help to describe your workflow a bit. If you mean by the PressBooks app, you could ask their devs.  
  > **username_1**: I think the xhtml extension is just optional and not mandatory for xhtml files (they are simply html coded according to XML standards). However, it is more common to use the extension inside ePubs.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-06-02. Score: 2 | Accepted answer
  
  This appears to be a distinction between EPUB 2 and EPUB 3. EPUB 2 content files are expected to have .HTML extensions. EPUB 3 content files are expected to have .XHMTL extensions. The same book converted to both EPUB 2 and 3, passes as perfect with HTML extensions in EPUB 2, but does yield warnings (NOT errors, and still works) with HTML extensions for EPUB 3. Simply changing the extensions from HTML to XHTML, with the same internal file content, prevents the warnings.
  
  Here's an example report on an EPUB 3 with HTML extensions from EPUB check:
  
  [![enter image description here](https://i.sstatic.net/Xod1b.png)](https://i.sstatic.net/Xod1b.png)
  
  
  ---
  
  