Before we split our E-book’s .html file into chapters, let’s run it past the W3C’s Validator.
Okay, okay, terrible joke. But the idea is sound, and important. This is an HTML5 document, styled using a now external CSS2 style sheet. (Someday, maybe, I’ll code the style sheet in CSS3, but don’t hold your breath.) It will become an E-book during Step 5, but for now, it’s a Web page. In fact, you can even go see it live on the Web:
Yellow Buick Review with External CSS
Yellow Buick Review “Apricot” .css file
Before we split this book into chapters, we should check to be sure that our code is correct. You find spelling errors in your documents with a a spell checker, and you find code errors in your E-books with a validator. To do that, you use the World Wide Web Consortium’s (W3C’s) Validation Service. There is a validator built into Adobe Dreamweaver, but all it does is ask the W3C’s Validation Service for an opinion. I’ll get exactly the same information using the Website.
I’ll do three things:
- Test my HTML code against the markup validator.
- Test my CSS code against the CSS validator.
- Fix any real errors that the validators point out. (Just as with spellcheckers, not all errors will be “real.”)
Why does Step 3 get four blog posts? Because the “Look and Feel” of your E-book matters.
The Bicycle Comics workflow has six steps, but maybe “phases” would be a better word. It’s tough for me to know the right level of detail: too little information and this blog won’t help people format their poetry E-books, too much information and I’ll scare away beginners. Once you get the hang of it, you’ll have no trouble simplifying your HTML and your CSS, streamlining your CSS, and making your internal CSS external. Those three tasks rightfully belong in Step 3, but I understand how advanced HTML/CSS coders might want to pick up the pace.
The primary points of this blog are to document the Bicycle Comics workflow for our future projects, and to provide a gathering point on the Web for best practices and conversations around electronic production (eprdctn) of poetry E-books. I’d love any and all feedback on pacing.
Tomorrow, we’ll move for real into Step 4, and I’ll talk about splitting the HTML file into sections. Meanwhile, though, I’ve made an expanded illustration of Step 3, with appropriate attention given to the tasks we’ve walked through so far.
What do you think? How has the pacing been on each step? Let me know in the comments or on Twitter at @ybreview.
Everything we’ve done so far has used an internal cascading style sheet (CSS). Now we’ll move it outside our .html files.
There are dozens, maybe hundreds, of tutorials that do a fine job explaining how you can move an internal cascading style sheet to an external .css file. I’ll give you just the basics, and then I’ll spend a little more time on the why, as pertains to E-book production.
In the previous post, we streamlined the CSS so that it is smaller and more elegant. Let’s pick up right there with the file “YBR_7_StreamlinedCSS.html .” (You can download all source code files for YBR for free.)
In short, we’re going to do three things:
- Remove the complete CSS info from our .html file with the “cut” command.
- “Paste” that CSS info into a separate, new document, which we’ll save as a .css file.
- Tell our .html file where the .css file is, so that our HTML can find our CSS whenever it needs it.
Let’s order lunch and streamline our code classes.
We’ve already nuked and simplified The Yellow Buick Review’s HTML/CSS. Before we make it external, let’s streamline our CSS (cascading style sheet) even more. What’s that? You don’t know how to streamline CSS code for a poetry anthology E-book? That’s no problem. Do you at least know how to order lunch? Cool! Let’s start with that. There’s an amazing fried chicken place around the corner from the office. I’ll go around and get everyone’s order: Continue reading
Dump the needless CSS you’ve inherited from prose-oriented programs, and replace it with CSS that understands poetry’s unique needs.
Pardon the mess; MS Word was visiting.
- It’s inside our .html file, which is not as useful/easy as giving it its own document.
- It’s terrible, terrible code anyway.
Just look at my highly technical illustration of the HTML file. See all the “junk” in there? That’s no good. Most poetry anthologies have enough junk as it is; let’s not put junk CSS in there, too. So, here’s what we’ll do about it:
If your E-book’s .html file has too much junk in it, take Thoreau’s advice and “simplify, simplify.”
Here’s what we’ll do.
- Make multiple backup copies.
- Change our HTML file to HTML5.
- Tidy up our HTML code automatically.
- Tidy up our HTML code manually.
- We’ll tidy up the CSS part next.
1. Make multiple copies of our .html (or .htm) file
Do it. We’ll be performing major surgery on these files. E-mail one to yourself. Put one on a USB thumb drive. Put one on DropBox. Redundancy defines our age. I’m starting with the file “YBR_1_MSWord_Style_Formatted.htm“. All Yellow Buick Review source files are free to download.