Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-18-2023, 06:30 AM   #1
mt.msla
Enthusiast
mt.msla began at the beginning.
 
mt.msla's Avatar
 
Posts: 39
Karma: 10
Join Date: May 2021
Device: PW 2 3gb
Post Add blank HTML file

Hello -

Is there a way to create a blank HTML file and the default extension be .html instead of .xhtml?

Just curious. Also, should I be using the .xhtml instead of .html? What would the difference or benefit be?

Thanks,

Andy
mt.msla is offline   Reply With Quote
Old 05-18-2023, 08:30 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
all epubs require xhtml files not html files. Xhtml files are true xml with case sensitivity and proper closing tag for every opening tag, etc. html code has much fewer restrictions and can omit closing tags such as a closing p tag in many circumstances leaving the code a bit of a spaghetti hash.

Early versions of epub3 required the .xhtml extension, now it is just recommended. Using .html is allowed but not encouraged. No matter what the extension, the contents are xhtml not html so matching the extension to the contents just makes the most sense.

Last edited by KevinH; 05-18-2023 at 09:05 AM.
KevinH is offline   Reply With Quote
Advert
Old 05-18-2023, 09:18 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
FYI, you can also mass change the file extension used for text files in Sigil at any point to be all .xhtml (or any other extension) using Sigil's BookBrowser
KevinH is offline   Reply With Quote
Old 05-18-2023, 10:18 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Not sure you were asking this as well, but you can add a blank page by right-clicking on the "Text" folder (or any current page IN the folder) and selecting "Add Blank HTML File" from the contextual pop-up. (see attachment)

As KevinH mentioned, the extension isn't as crucial as the content (xml syntax), don't be thrown off that the pop-up says HTML instead of XHTML.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2023-05-18 100934.png
Views:	66
Size:	27.3 KB
ID:	201593  
Turtle91 is offline   Reply With Quote
Old 05-18-2023, 06:11 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by mt.msla View Post
Just curious. Also, should I be using the .xhtml instead of .html? What would the difference or benefit be?
See our discussion back in:

Like KevinH said, EPUBs require XHTML.

What's the difference?

Well, HTML is very loose with their rules + XHTML is a little more strict.

So HTML would allow code like:

Code:
<p>This is a paragraph.
<p>This is another paragraph.
where XHTML says: "Hey! If you open it, you need to close it too!"

Code:
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
Or like KevinH said, one XHTML rule is "all lowercase tags", so HTML allows:

Code:
<P>This is a paragraph.</p>
<BLOCKQUOTE><p>This is a blockquote with <SpAn>a span</span>.</p></BLOCKQUOTE>
XHTML:

Code:
<p>This is a paragraph.</p>
<blockquote><p>This is a blockquote with <span>a span</span>.</p></blockquote>
There are a few more basic differences like that, (and then some extremely technical ones that most people will never need to know about).

All you need to know is that Sigil's Mend and Prettify will clean up a lot of that junk if you accidentally put it in your documents. :P

Last edited by Tex2002ans; 05-18-2023 at 06:26 PM.
Tex2002ans is offline   Reply With Quote
Advert
Old 05-18-2023, 07:45 PM   #6
mt.msla
Enthusiast
mt.msla began at the beginning.
 
mt.msla's Avatar
 
Posts: 39
Karma: 10
Join Date: May 2021
Device: PW 2 3gb
Appreciate the help! Esp @Tex2002ans
mt.msla is offline   Reply With Quote
Reply

Tags
add blank, blank, html, xhtml


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JPG image lost when add HTML file to Calibre mshane Conversion 8 01-03-2013 06:08 PM
HTML input plugin stripping text within toc tags in child html file nimblebooks Conversion 3 02-21-2012 03:24 PM
Convert HTML to MOBI (HTML recognized as ZIP file) pdubois Conversion 1 01-25-2011 12:55 PM
Add book as HTML file Mister_R Calibre 5 10-19-2010 10:43 AM
Add a blank page rodrigo2008 iRex 1 04-22-2008 01:46 AM


All times are GMT -4. The time now is 12:45 AM.


MobileRead.com is a privately owned, operated and funded community.