Quote:
Originally Posted by JSWolf
The first thing to learn is HTML/CSS. Then from there you can learn the technical stuff to do with ePub.
|
Good point - one thing many don't get is that there is a difference between XML and HTML and then XHTML muddies the water as it is sometimes served w/ HTML mime type instead of XML mime type.
With HTML certain tags MUST have a child node, even if the child node is empty - examples are
a and
script and
style. That means they can not be self-closing in HTML.
With XML any node can be self closing and be legal. Not all make sense to be, but they can be.
With XHTML though - those tags where HTML requires a child node can only be self closing IF served with an XML mime type. WordPress for example does this, it uses XHTML but is served with HTML mime type so the HTML rules apply, not the XML rules.
But with ePub since an XML mime type is specified in the .opf, the XML rules apply, any tag can be self closing so you don't have to use a separate closing tag unless it has a child node (including text) and some tags that don't have to be closed in HTML (like
br and
img and
hr) do have to be self closing in ePub.
Also - with HTML tags are not case sensitive but with XML they are, so with ePub since XML mime type is specified, only use lower case tags for the XHTML and I think the .opf also only ever uses lower case tags.