【发布时间】:2016-07-19 01:32:41
【问题描述】:
试图让 ePub 文件通过 Apple 的 ePub 检查器,但多次出现两个错误。
(1) 此处不允许使用元素“img”;期望元素...
这是页面上的编码:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../Styles/Style.css" type="text/css" rel="stylesheet"/>
<title></title>
</head>
<body>
<h2>Tokyo</h2>
<p>Japan is made up of five main islands: Hokkaido, Honshu, Shikoku, Kyushu, and Okinawa. Over three-quarters of the 127 million people in Japan live on Honshu, the largest and most developed island. Tokyo, the capital, lies on its eastern shore.</p>
<img alt="Tokyo Metropolis" src="../Images/Tokyo-Metropolis.jpg"/>
<p>Tokyo Metropolis, one of Japan’s 47 prefectures, is comprised of two areas: the <a class="hook" id="Special-Wards-23">23 special wards</a>, which together make up what most consider to be Tokyo, and the rest—the cities and towns that lie to the west. It is best thought of as a constellation of cities that have, over the course of time, merged into one vast urban sprawl which is home to over 13 million people.</p>
我正确插入了 alt 标签,它在 iBooks 中显示正确。
img 的 CSS 如下:
img
{
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 15px;
margin-bottom: 15px;
padding: 1px;
border: 1px solid #021a40;
background-color: #FFFFFF;
}
我浏览了许多论坛,但对我为什么会收到此错误一无所知。
(2) 相同的错误,但与标签有关(此处不允许使用“元素“ul”;预期结束标签或元素“li”...”)
这里是 HTML...
<ul>
<li><a href="../Text/Introduction.xhtml"><b>Introduction</b></a></li>
<ul>
<li><a href="../Text/Tokyo.xhtml">Tokyo</a></li>
<li><a href="../Text/A%20Brief%20History.xhtml">A Brief History</a></li>
<ul>
<li><a href="../Text/A%20Brief%20History.xhtml#The-Emergence-of-Japan">The Emergence of Japan</a></li>
[Html 很短,因为它是一个目录并且很长]。
我认为这是因为我有嵌套列表,但这在 iBooks 中完美运行,所以我不知道为什么它会导致验证错误。
非常感谢您的帮助!
【问题讨论】:
标签: epub