When I "add a blank HTML file", this file contains the following code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
I want to create an ePub to run kindlegen on it. In KDP Guidelines 3.1.4. "Amazon recommends specifying the encoding of the HTML files in the HTML itself by using the <meta> tag in the <head> section".
As I am a good boy, I add the meta to the head section:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title></title>
</head>
When I save this file, the added meta is removed unless I uncheck the "Automatically clean and format HTML source code" in preferences. However when I check the epub with FlightCrew it is OK.
So, is it removed because it is redundant with the first line?
Code:
<?xml version="1.0" encoding="utf-8"?>
Any other explanation?
Thanks.