I own a book formatting company, and one thing I I've learned from it is that people from all walks of life, from physicians to politicians, all forget most of what they learned in school about proper writing by the time they're thirty. Most people don't even remember how to use something as simple as a comma, what the difference is between a comma and a semicolon, and when to use either. I've kept a BarCharts English Grammar & Punctuation Guide by my desk for the past 15 years. It's just a 4-page laminated pamphlet that will quickly tell 95% of us everything we need to know in order to write properly. For less than $7.00 it can't be beat. And being laminated, it will last a lifetime.
Even if all you write is an occasional blog post, this thing is a Godsend. Can't remember when to use an En dash or an Em dash? Don't remember when to place punctuation inside quote marks and parenthesis or outside them? How many dots go in an ellipsis? Do you ever capitalize the first word after a colon? If you place the title of a magazine in italics, then how do you set off the name of an individual article within that magazine? All the answers are just fingertips away.
I got my copy at a local B&N years ago. You can also find them online all over the place. Don't be without a copy. For $7.00 you can't go wrong.
eBook Pioneers
We format eBooks!
Monday, September 5, 2016
Monday, January 4, 2016
Why eBooks Are Reflowable & Don't Have Page Numbers
This is a short video I made where I attempt to show why eBooks are reflowable and do not have any real page numbers. This is a very confusing subject to people, especially authors who don't own an eReader and yet want to publish their books as eBooks. (ALL authors should own at least one Kindle and one Nook and / or Kobo.)
Labels:
eBooks,
ePub,
kindle,
mobi,
page numbers,
reflowable
Wednesday, December 17, 2014
A Website For Playwrights To Show Their Work
I found a nice website for playwrights to post either entire plays or portions of them in PDF format in hopes that production companies will pick them up. They have tip jars for the authors as well. It's here:
http://proplay.ws
It's also good for people who want to learn how to write a play and the page layouts for them. Interesting to me were the musicals. I always wondered how those were written out. There's a lot of written description of the action and the songs themselves are written in the play transcript. This is a great example:
http://proplay.ws/scripts/belles.pdf
~~~
[eBook Pioneers|http://ebookpioneers.com] (A formatting service.) I format in HTML to have more control over the fine details.
"Do I not destroy my enemies when I make them my friends?" ~ Abraham Lincoln
http://proplay.ws
It's also good for people who want to learn how to write a play and the page layouts for them. Interesting to me were the musicals. I always wondered how those were written out. There's a lot of written description of the action and the songs themselves are written in the play transcript. This is a great example:
http://proplay.ws/scripts/belles.pdf
~~~
[eBook Pioneers|http://ebookpioneers.com] (A formatting service.) I format in HTML to have more control over the fine details.
"Do I not destroy my enemies when I make them my friends?" ~ Abraham Lincoln
Labels:
musicals,
plays,
stage,
theatrical,
writing
Saturday, March 2, 2013
How to Use KindleGen to Make a Mobi Book File
I must see a dozen posts per month asking about using KindleGen. Here's how to use it although I highly recommend just dragging and dropping your book file onto Previewer's face instead. (You can also drag and drop your file onto "kindlegen.exe" to convert it.)
1) Download the kindlegen_win32_v2_8.zip file to your desktop. You can find it here:
http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211
2) Open your C-drive directory. The easiest way to get to your C-drive is to double click on Computer on your desktop (or My Computer if you're using an OS older than Windows 7.)
Then double click on Local Disc (C).
You'll see other folders in there such as Program Files, Users, Windows etc.
Make a new folder in this directory and call it KindleGen.
3) Shrink the C-drive window down and go back to the zip file on your desktop and double click to open it. (There's no need to extract it.)
4) Copy the file in there called: kindlegen.exe and paste it into that new KindleGen folder we just made in the C-drive directory. While you're still in the new KindleGen folder, make another folder inside it called: Book
5) So now you have a KindleGen folder on your C-drive and inside is the kindlegen.exe file and the Book folder. Find an HTML, ePub, or OPF file that you wish to convert into a Mobi book and paste it into that Book folder. Of course, if it's an OPF file you're pasting, then you'll also need all the other folders and files that go with the making of the book such as the NCX, ALL HTML files, all images, any embedded fonts etc.
6) Go to All Programs\Accessories and open Command Prompt.
7) Copy the following and then right-click beside the cursor in Command Prompt and paste it in. (Control V doesn't work in Windows 7.) Make sure to change "your_book" to whatever the name of the file is you have in the Book folder along with the correct suffix (epub, opf, or html.):
C:\KindleGen\kindlegen.exe C:\KindleGen\Book\your_book.epub
8) Hit the Enter button on your keyboard. KindleGen will convert the book and place the new Mobi file inside the Book folder.
9) KindleGen will use the standard c1 compression unless you tell it otherwise. The other choices are c0 (no compression) or c2 (the most compression.) To use c0 or c2, paste in one of the following:
C:\KindleGen\kindlegen.exe -c0 C:\KindleGen\Book\your_book.epub
C:\KindleGen\kindlegen.exe -c2 C:\KindleGen\Book\your_book.epub
The other commands available through KindleGen simply aren't worth messing with because you can do them better and easier without KindleGen. For instance, you can force KG to change all your jpg images to gif. Or you can force it to give a new name to the Mobi file it outputs. And honestly, the three compression schemes produce files that aren't very different in size at all. It might be worth using c2 compression once in a great while if you have a large book that's just barely over (let's say) 2MB in size and you'd like to keep it under 2MB in order to avoid an extra 15-cents in Amazon's delivery fees.
And obviously you can name your Book and KindleGen folders something else and put them somewhere other than the C-drive once you have this directory stuff down. You can also delete the zip file now and all the files inside it. They're all useless except for the kindlegen.exe file that we already copied.
That's about it. Now really, isn't it a lot easier just to drag and drop the file you want to convert onto Previewer?
1) Download the kindlegen_win32_v2_8.zip file to your desktop. You can find it here:
http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211
2) Open your C-drive directory. The easiest way to get to your C-drive is to double click on Computer on your desktop (or My Computer if you're using an OS older than Windows 7.)
Then double click on Local Disc (C).
You'll see other folders in there such as Program Files, Users, Windows etc.
Make a new folder in this directory and call it KindleGen.
3) Shrink the C-drive window down and go back to the zip file on your desktop and double click to open it. (There's no need to extract it.)
4) Copy the file in there called: kindlegen.exe and paste it into that new KindleGen folder we just made in the C-drive directory. While you're still in the new KindleGen folder, make another folder inside it called: Book
5) So now you have a KindleGen folder on your C-drive and inside is the kindlegen.exe file and the Book folder. Find an HTML, ePub, or OPF file that you wish to convert into a Mobi book and paste it into that Book folder. Of course, if it's an OPF file you're pasting, then you'll also need all the other folders and files that go with the making of the book such as the NCX, ALL HTML files, all images, any embedded fonts etc.
6) Go to All Programs\Accessories and open Command Prompt.
7) Copy the following and then right-click beside the cursor in Command Prompt and paste it in. (Control V doesn't work in Windows 7.) Make sure to change "your_book" to whatever the name of the file is you have in the Book folder along with the correct suffix (epub, opf, or html.):
C:\KindleGen\kindlegen.exe C:\KindleGen\Book\your_book.epub
8) Hit the Enter button on your keyboard. KindleGen will convert the book and place the new Mobi file inside the Book folder.
9) KindleGen will use the standard c1 compression unless you tell it otherwise. The other choices are c0 (no compression) or c2 (the most compression.) To use c0 or c2, paste in one of the following:
C:\KindleGen\kindlegen.exe -c0 C:\KindleGen\Book\your_book.epub
C:\KindleGen\kindlegen.exe -c2 C:\KindleGen\Book\your_book.epub
The other commands available through KindleGen simply aren't worth messing with because you can do them better and easier without KindleGen. For instance, you can force KG to change all your jpg images to gif. Or you can force it to give a new name to the Mobi file it outputs. And honestly, the three compression schemes produce files that aren't very different in size at all. It might be worth using c2 compression once in a great while if you have a large book that's just barely over (let's say) 2MB in size and you'd like to keep it under 2MB in order to avoid an extra 15-cents in Amazon's delivery fees.
And obviously you can name your Book and KindleGen folders something else and put them somewhere other than the C-drive once you have this directory stuff down. You can also delete the zip file now and all the files inside it. They're all useless except for the kindlegen.exe file that we already copied.
That's about it. Now really, isn't it a lot easier just to drag and drop the file you want to convert onto Previewer?
Friday, February 15, 2013
Places to Get Independent eBooks Reviewed
Indie authors have a hard time getting quality reviews, and many reviewers
won't review eBooks at all. However I have here a nice long list of those that
will.
www.goodreads.com
www.shelfari.com
www.smashwords.com
http://idreambooks.com
http://www.thebookreviewforfiction.com/
www.bookbrowse.com
www.bookpage.com
www.dannyreviews.com
www.electronicbookreview.com
www.allreaders.com
www.reviewsofbooks.com
http://imprints.simonandschuster.biz/atria/vyou
www.bookreporter.com
http://www.tracknewbook.com
http://www.book-buzzes.com
http://anynewbooks.com
http://www.authoralerts.com
http://www.wowbrary.org
http://www.cheapriver.com
http://www.windowshop.com
http://www.oskope.com
http://amaztype.tha.jp
http://www.lulu.com
http://www.flamingnet.com
http://www.litpick.com
http://www.wattpad.com
http://www.goodreads.com/list
http://askdavid.com/free-book-promotion
https://www.createspace.com
http://www.pebblefootpark.com
https://www.tumblr.com
http://www.arcindie.com
http://succotashreviews.blogspot.com
http://silversolara.blogspot.com
http://www.theindieview.com/indie-reviewers
http://ebookdailydeals.com
http://authormarketingclub.com
http://www.kindleboards.com/index.php/topic,114408.0.html
http://addictedtoebooks.com/
http://authormarketingclub.com/members/submit-your-book/
http://bargainebookhunter.com/feature-your-book/
http://blog.booksontheknob.org/
http://the-cheap.net/contact-2/
http://ereadernewstoday.com/
http://fireapps.blogspot.com/p/for-app-developers.html
http://flurriesofwords.blogspot.com/
http://freebooksy.com
http://goodkindles.blogspot.com/p/how-to-add-book.html
http://kindle-author.com/advertise/
http://kindlenationdaily.com/
http://thefrugalereader.wufoo.com/forms/frugal-freebie-submissions/
http://thekindledailydeal.com/contact.cfm
http://super-e-books.com/submit-your-book/
http://www.centsibleereads.com/p/for-authors.html
http://www.ereaderiq.com/free/
http://www.fkbooksandtips.com/
http://www.freeebooksdaily.com/p/contact.html
http://www.indiebookslist.com/
http://www.pixelofink.com/
http://kindlespice.com/submissions
http://www.shainarichmond.com/myblogs/spicy-romance-submission-form/
https://docs.google.com/spreadsheet/viewform?formkey=dFNrbUVhS3JUQW5EREtaOTB6UUwtUnc6MQ
http://www.squidoo.com/going-free-kindle-ebook-promotional-campaigns-for-authors
http://ruthnestvold.wordpress.com/2012/03/04/promoting-ebooks-with-kdp-select/
http://www.greatreads.intheuk.me/
http://www.sciencethrillers.com
http://centralcaligrrrl.blogspot.com
http://traditionalmysteries.blogspot.com
http://reviewsbythedragonsden.com
http://srivallip.blogspot.com
http://sammywrites.blogspot.com
http://readingisawayoflife.blogspot.com
http://www.pussreboots.pair.com
http://prettysinister.blogspot.com
http://peaceloveandreviews.com
http://passionreads.com
http://bookbloggerdirectory.wordpress.com/fiction-blogs/action-adventure-mystery-horror-thrillers-espionage/www.partnersincrimetours.net
http://www.anovelsource.com
http://mysterythrillerandromanticsusreviews.blogspot.com
http://www.mmbearcupoftea.com
http://kindlemystery.blogspot.com
http://lostinebooks.blogspot.com
http://ratb2.blogspot.com
http://thegingernutcase.blogspot.com
http://genrewench.blogspot.com
http://www.fairdinkumcrime.com
http://existentialennui.blogspot.com
http://cyberbookworm.wordpress.com
http://criminalpages.blogspot.com
http://cmashlovestoread.blogspot.com
http://castlemacabre.blogspot.com
http://www.booksarelife-vitalibri.blogspot.com
http://gabixlerreviews-bookreadersheaven.blogspot.com
http://bookden.blogspot.com
http://thebestobooks.blogspot.com
http://www.theaudiobookguy.com
http://www.ashedit.wordpress.com
http://booksasportablepiecesofthought.blogspot.com
http://aliveontheshelves.com
http://alchemyofscrawl.blogspot.com
http://www.lawillis.blogspot.com
https://www.facebook.com/groups/FreeTodayOnAmazon
https://www.facebook.com/groups/freetoday
http://www.bookish.com/home
http://www.ohioanabookfestival.org
https://bitly.com
http://www.bookbub.com/home
http://digitalbooktoday.com
www.goodreads.com
www.shelfari.com
www.smashwords.com
http://idreambooks.com
http://www.thebookreviewforfiction.com/
www.bookbrowse.com
www.bookpage.com
www.dannyreviews.com
www.electronicbookreview.com
www.allreaders.com
www.reviewsofbooks.com
http://imprints.simonandschuster.biz/atria/vyou
www.bookreporter.com
http://www.tracknewbook.com
http://www.book-buzzes.com
http://anynewbooks.com
http://www.authoralerts.com
http://www.wowbrary.org
http://www.cheapriver.com
http://www.windowshop.com
http://www.oskope.com
http://amaztype.tha.jp
http://www.lulu.com
http://www.flamingnet.com
http://www.litpick.com
http://www.wattpad.com
http://www.goodreads.com/list
http://askdavid.com/free-book-promotion
https://www.createspace.com
http://www.pebblefootpark.com
https://www.tumblr.com
http://www.arcindie.com
http://succotashreviews.blogspot.com
http://silversolara.blogspot.com
http://www.theindieview.com/indie-reviewers
http://ebookdailydeals.com
http://authormarketingclub.com
http://www.kindleboards.com/index.php/topic,114408.0.html
http://addictedtoebooks.com/
http://authormarketingclub.com/members/submit-your-book/
http://bargainebookhunter.com/feature-your-book/
http://blog.booksontheknob.org/
http://the-cheap.net/contact-2/
http://ereadernewstoday.com/
http://fireapps.blogspot.com/p/for-app-developers.html
http://flurriesofwords.blogspot.com/
http://freebooksy.com
http://goodkindles.blogspot.com/p/how-to-add-book.html
http://kindle-author.com/advertise/
http://kindlenationdaily.com/
http://thefrugalereader.wufoo.com/forms/frugal-freebie-submissions/
http://thekindledailydeal.com/contact.cfm
http://super-e-books.com/submit-your-book/
http://www.centsibleereads.com/p/for-authors.html
http://www.ereaderiq.com/free/
http://www.fkbooksandtips.com/
http://www.freeebooksdaily.com/p/contact.html
http://www.indiebookslist.com/
http://www.pixelofink.com/
http://kindlespice.com/submissions
http://www.shainarichmond.com/myblogs/spicy-romance-submission-form/
https://docs.google.com/spreadsheet/viewform?formkey=dFNrbUVhS3JUQW5EREtaOTB6UUwtUnc6MQ
http://www.squidoo.com/going-free-kindle-ebook-promotional-campaigns-for-authors
http://ruthnestvold.wordpress.com/2012/03/04/promoting-ebooks-with-kdp-select/
http://www.greatreads.intheuk.me/
http://www.sciencethrillers.com
http://centralcaligrrrl.blogspot.com
http://traditionalmysteries.blogspot.com
http://reviewsbythedragonsden.com
http://srivallip.blogspot.com
http://sammywrites.blogspot.com
http://readingisawayoflife.blogspot.com
http://www.pussreboots.pair.com
http://prettysinister.blogspot.com
http://peaceloveandreviews.com
http://passionreads.com
http://bookbloggerdirectory.wordpress.com/fiction-blogs/action-adventure-mystery-horror-thrillers-espionage/www.partnersincrimetours.net
http://www.anovelsource.com
http://mysterythrillerandromanticsusreviews.blogspot.com
http://www.mmbearcupoftea.com
http://kindlemystery.blogspot.com
http://lostinebooks.blogspot.com
http://ratb2.blogspot.com
http://thegingernutcase.blogspot.com
http://genrewench.blogspot.com
http://www.fairdinkumcrime.com
http://existentialennui.blogspot.com
http://cyberbookworm.wordpress.com
http://criminalpages.blogspot.com
http://cmashlovestoread.blogspot.com
http://castlemacabre.blogspot.com
http://www.booksarelife-vitalibri.blogspot.com
http://gabixlerreviews-bookreadersheaven.blogspot.com
http://bookden.blogspot.com
http://thebestobooks.blogspot.com
http://www.theaudiobookguy.com
http://www.ashedit.wordpress.com
http://booksasportablepiecesofthought.blogspot.com
http://aliveontheshelves.com
http://alchemyofscrawl.blogspot.com
http://www.lawillis.blogspot.com
https://www.facebook.com/groups/FreeTodayOnAmazon
https://www.facebook.com/groups/freetoday
http://www.bookish.com/home
http://www.ohioanabookfestival.org
https://bitly.com
http://www.bookbub.com/home
http://digitalbooktoday.com
Wednesday, January 30, 2013
Gaming the System at Amazon Kindle Books
I've always contended that there are a number of people gaming the KDP system.
Today I'll offer evidence of it.
You can make yourself look very good if you have a few hundred, or even a few thousand bucks, to spare by going to the store and buying "gift" credit cards and then use them to buy your own books after lowing the price to 99 cents (or free) and then leave yourself reviews with a credit card that isn't linked to your real name. You can register a gift card under any fake name, phone #, and address you like. Then Amazon has no way of knowing who you really are, and they'll accept your reviews of your own books. Kid's stuff-101, right?
WHAT TO WATCH FOR
The vast majority of mainstream authors will sell about as many print books as they do Kindle books. Providing the Kindle and print editions come out around the same time, their sales rankings will be pretty close. Hardback sales usually take a nosedive after the print/kindle edtions come out, so you generally can't count those. However, sometimes the Kindle edition will come out while the hardback is still selling well and there isn't yet a paperback edition, or if there is one, it's something like a large print edition or a mass produced edition if it's a classic, and those don't sell very good. In that case, the Kindle and hardback editions may rank very close in sales. A good example is Bill O'Reilly's Killing Lincoln. The only paperback edition of that book is a large print edition, so it doesn't sell well at all. But look how close the hardback and Kindle eidtions are in sales ranking:
Hardback - 60 # ranking
Kindle - 174
Here's an example of someone I won't name, but it's a self-published author who sells extremely well through Kindle books, but look at their Createspace paperback sales ranking of the same book which has been out for a couple of years now:
Paperback - 1,365,020
Kindle - 1,352
Now let's look at a book by a good traditional author. Fitzgerald's The Great Gatsby is on the best seller's list again because of the new movie coming out.
Paperback - 17
Kindle - 144
Lady Almina and the Real Downton Abbey: The Lost Legacy of Highclere Castle by the The Countess Of Carnarvon is big because of the PBS Downtown Abbey series:
Paperback - 38
Kindle - 461
If someone self-published uses KDP (Kindle books) & Createspace (or Lulu) and has their book(s) available in both Kindle and print editions, and they're a big seller, then their sales rankings should run close to the same in both Kindle and print since the buying public purchases about as many Kindle books as print books right now. (Actually, paperback sales are generally still a bit higher.) If you see a large descrepency, between the two, you can bet it's probably somebody gaming the system. After all, it's cheap for someone with a good job to spend a thousand dollars on gift cards in order to produce sales and phoney reviews by just lowering the price on their Kindle books now and then use gift cards to spend a dollar on each in order to make a few purchases and leave reviews, and then raise the price back up the next morning. But how do they do the same with print books without loosing their shirts? They can't. The Kindle books didn't cost them anything to make or sell. But they can't lower the price of print books below a threshhold that covers all the costs of it, and that isn't cheap, so gaming the system with print books is very difficult unless you're very rich.
The gist of things is this: If Kindle sales rankings are very high, and print sales rankings are very low, there's reason for concern.
You can make yourself look very good if you have a few hundred, or even a few thousand bucks, to spare by going to the store and buying "gift" credit cards and then use them to buy your own books after lowing the price to 99 cents (or free) and then leave yourself reviews with a credit card that isn't linked to your real name. You can register a gift card under any fake name, phone #, and address you like. Then Amazon has no way of knowing who you really are, and they'll accept your reviews of your own books. Kid's stuff-101, right?
WHAT TO WATCH FOR
The vast majority of mainstream authors will sell about as many print books as they do Kindle books. Providing the Kindle and print editions come out around the same time, their sales rankings will be pretty close. Hardback sales usually take a nosedive after the print/kindle edtions come out, so you generally can't count those. However, sometimes the Kindle edition will come out while the hardback is still selling well and there isn't yet a paperback edition, or if there is one, it's something like a large print edition or a mass produced edition if it's a classic, and those don't sell very good. In that case, the Kindle and hardback editions may rank very close in sales. A good example is Bill O'Reilly's Killing Lincoln. The only paperback edition of that book is a large print edition, so it doesn't sell well at all. But look how close the hardback and Kindle eidtions are in sales ranking:
Hardback - 60 # ranking
Kindle - 174
Here's an example of someone I won't name, but it's a self-published author who sells extremely well through Kindle books, but look at their Createspace paperback sales ranking of the same book which has been out for a couple of years now:
Paperback - 1,365,020
Kindle - 1,352
Now let's look at a book by a good traditional author. Fitzgerald's The Great Gatsby is on the best seller's list again because of the new movie coming out.
Paperback - 17
Kindle - 144
Lady Almina and the Real Downton Abbey: The Lost Legacy of Highclere Castle by the The Countess Of Carnarvon is big because of the PBS Downtown Abbey series:
Paperback - 38
Kindle - 461
If someone self-published uses KDP (Kindle books) & Createspace (or Lulu) and has their book(s) available in both Kindle and print editions, and they're a big seller, then their sales rankings should run close to the same in both Kindle and print since the buying public purchases about as many Kindle books as print books right now. (Actually, paperback sales are generally still a bit higher.) If you see a large descrepency, between the two, you can bet it's probably somebody gaming the system. After all, it's cheap for someone with a good job to spend a thousand dollars on gift cards in order to produce sales and phoney reviews by just lowering the price on their Kindle books now and then use gift cards to spend a dollar on each in order to make a few purchases and leave reviews, and then raise the price back up the next morning. But how do they do the same with print books without loosing their shirts? They can't. The Kindle books didn't cost them anything to make or sell. But they can't lower the price of print books below a threshhold that covers all the costs of it, and that isn't cheap, so gaming the system with print books is very difficult unless you're very rich.
The gist of things is this: If Kindle sales rankings are very high, and print sales rankings are very low, there's reason for concern.
Monday, October 8, 2012
A Crash Course In CSS
I'm posting this for people who are trying to format their own eBooks. I have a business formatting eBooks (see ths sidebar for a link to my business pages), but I like to try and help people do it themselves too.
Of all the books and online articles written about CSS, I've yet to see a single one that addressed the basics in a way that would answer all your questions quickly and easily. I'm going to attempt to do that here though for those who want to learn it. I still have plenty to learn (there's ALWAYS more to learn!), and so will you, but this is the foundation of CSS.
Cascading Style Sheets control the placement and look of elements on HTML pages and give you more control than HTML tags themselves do. The important things to remember are that they're called cascading for a reason. You can use an EXTERNAL style sheet, you can use INTERNAL styles in the head, or INLINE styles directly within a paragraph or other page element. (Just remember not to try to use them in tables for the most part.) An internal style will override the external style sheet. And an inline style will override both the internal and external styles, thus the term "cascading."
With external style sheets you merely write the styles down anywhere in the sheet and then link to that sheet from the HTML page(s). With internal styles you write them in the <head>Styles here.</head> Then you apply those styles to a page element such as a paragraph usually using a CLASS. So you might have a style listed in the head like this:
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="en-us" http-equiv="Content-Language" />
<title>Ebook Pioneers</title>
<style type="text/css">
H1 { font-size: x-large; color: red }
</style>
</head>
Now let's look at that style closer:
<style type="text/css">
H1 { font-size: x-large; color: red }
</style>
The style TYPE is always the same: <style type="text/css">. It would appear that when CSS was first being developed, room was left for the development of other types, but as far as I know, "text/css" is still the only type that's ever been used in CSS.
H1 is HTML code for a Heading 1 style which is quite large lettering. That H1 is called a SELECTOR. It's telling us the element on the page that the style is being applied to; in this case it's any Heading 1 elements that are on the page.
Font-size and color are both PROPERTIES of the Heading 1.
X-large and red are VALUES asigned to the properties.
Then we always finish with a slash before "style" to END the style:
</style>
Now there's only one style there, but we could place as many stles as we needed between <style type="text/css"> and </style>. For instance:
<style type="text/css">
p {
margin-top: 0.0em;
margin-bottom: 0.0em;
text-indent:1.5em
}
p.breakhere {
page-break-before: always
}
</style>
The capital "P" here all by itself indicates a paragraph selector for ALL paragraphs, so our style is going to be applied to each and every pargraph. Every paragraph on the page will have a zero margin before it and after it, meaning that there will be no blank lines between any of the paragraphs. And each paragraph will have an indent of 1.5em. (An "em" is a unit of measure representing the size of a typical capital letter in the paragraph.)
p.breakhere you'll notice uses a small "p" followed by a period and "breakhere". This is a style that will be used on various paragraphs that we choose rather than to ALL of them. The "p" again indicates "paragraph" and the ".breakhere" is called a CLASS. In order for this style to take effect on any of the paragraphs you would need to go to a paragraph where you want to use that style (in this case a pagebreak so eReaders will know to start a new page on that paragraph). A paragraph normally starts with a p tag: <p>. We'll place our paragraph class inside that tag like this:
<p class="breakhere">Text goes here.</p>
Now, instead of placing styles in the <head> you can also place them directly witin a page element. This is called an "inline style." For example:
<p style="margin: 2em 2em;">Text here.</p>
There I'm telling that paragraph (and only that paragraph) to place the equivalent of two blank lines on each side of it. If you only have a few of paragraphs that need a style that's different from the others, then applying an inline style is often the best way to go.
You can mix an inline style with an internal or external style (class) too like this (for example):
<p class="breakhere" style="margin: 2em 2em;">Text here.</p>
So there we have a CLASS that came from a style placed in the <head> and we've added an inline style for the margins of this paragraph as well.
But remember this: You CAN'T group classes in mobi 7 books. The first two generations of Kindle eReaders don't recognize CSS formatting, so KindleGen and other mobi converters convert CSS styles to HTML equivalents for them, but they will NOT properly render the styles as HTML for those older eReaders if you try to have more than one CSS class in an element. So you can have an inline style mixed with one internal class, but no more than that. You couldn't apply one class for text color and another for text size. But you CAN have as many properties/values as you want (for the most part) within ONE style whether it's internal, external, or inline. For instance, you could have a style declaration that addresses font color, size, type, indent etc. all with a single style. In the following I have one inline style consisting of one property (text) but with two values (indent and margin) separated by a semicolon. I could have as many properties and values as I wanted in this one style:
<p style="text-indent: 0em; margin: 0em 0em 1em 0em;">Text here.</p>
So I couldn't write "style" (indicating an inline style) a second time in that paragraph opening tag, nor could I write "class" twice to declare yet another style. I could, however, apply a second style from the head or an external sheet as a CLASS.
I can do this (a style and a class):
<p class="blockquote" style="margin: 2em 2em;">Text here.</p>
But not this:
<p style="blockquote" style="margin: 2em 2em;">Text here.</p>
Or this:
<p class="blockquote" class="margin: 2em 2em;">Text here.</p>
Lastly, if you want to apply a style to just a few words in a paragraph (or even just one letter), then you would use a "span." Here we'll just make the word "Spain" have a red font color:
<p>The rain in <span style="color:red">Spain</span> falls mainly on the plain.</p>
Remember to look at Amazon's guide to see which styles will and won't work. And they will degrade nicely to HTML entities for Kindle 1 and Kindle 2 eReaders.
This post just gives the basics of how CSS works. You'll never remember all the hundreds of styles available for web page elements, so it's good to invest in a good reference book. I highly recommend:
O'Reilly's Head First HTML With CSS & XHTML
Of all the books and online articles written about CSS, I've yet to see a single one that addressed the basics in a way that would answer all your questions quickly and easily. I'm going to attempt to do that here though for those who want to learn it. I still have plenty to learn (there's ALWAYS more to learn!), and so will you, but this is the foundation of CSS.
Cascading Style Sheets control the placement and look of elements on HTML pages and give you more control than HTML tags themselves do. The important things to remember are that they're called cascading for a reason. You can use an EXTERNAL style sheet, you can use INTERNAL styles in the head, or INLINE styles directly within a paragraph or other page element. (Just remember not to try to use them in tables for the most part.) An internal style will override the external style sheet. And an inline style will override both the internal and external styles, thus the term "cascading."
With external style sheets you merely write the styles down anywhere in the sheet and then link to that sheet from the HTML page(s). With internal styles you write them in the <head>Styles here.</head> Then you apply those styles to a page element such as a paragraph usually using a CLASS. So you might have a style listed in the head like this:
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="en-us" http-equiv="Content-Language" />
<title>Ebook Pioneers</title>
<style type="text/css">
H1 { font-size: x-large; color: red }
</style>
</head>
Now let's look at that style closer:
<style type="text/css">
H1 { font-size: x-large; color: red }
</style>
The style TYPE is always the same: <style type="text/css">. It would appear that when CSS was first being developed, room was left for the development of other types, but as far as I know, "text/css" is still the only type that's ever been used in CSS.
H1 is HTML code for a Heading 1 style which is quite large lettering. That H1 is called a SELECTOR. It's telling us the element on the page that the style is being applied to; in this case it's any Heading 1 elements that are on the page.
Font-size and color are both PROPERTIES of the Heading 1.
X-large and red are VALUES asigned to the properties.
Then we always finish with a slash before "style" to END the style:
</style>
Now there's only one style there, but we could place as many stles as we needed between <style type="text/css"> and </style>. For instance:
<style type="text/css">
p {
margin-top: 0.0em;
margin-bottom: 0.0em;
text-indent:1.5em
}
p.breakhere {
page-break-before: always
}
</style>
The capital "P" here all by itself indicates a paragraph selector for ALL paragraphs, so our style is going to be applied to each and every pargraph. Every paragraph on the page will have a zero margin before it and after it, meaning that there will be no blank lines between any of the paragraphs. And each paragraph will have an indent of 1.5em. (An "em" is a unit of measure representing the size of a typical capital letter in the paragraph.)
p.breakhere you'll notice uses a small "p" followed by a period and "breakhere". This is a style that will be used on various paragraphs that we choose rather than to ALL of them. The "p" again indicates "paragraph" and the ".breakhere" is called a CLASS. In order for this style to take effect on any of the paragraphs you would need to go to a paragraph where you want to use that style (in this case a pagebreak so eReaders will know to start a new page on that paragraph). A paragraph normally starts with a p tag: <p>. We'll place our paragraph class inside that tag like this:
<p class="breakhere">Text goes here.</p>
Now, instead of placing styles in the <head> you can also place them directly witin a page element. This is called an "inline style." For example:
<p style="margin: 2em 2em;">Text here.</p>
There I'm telling that paragraph (and only that paragraph) to place the equivalent of two blank lines on each side of it. If you only have a few of paragraphs that need a style that's different from the others, then applying an inline style is often the best way to go.
You can mix an inline style with an internal or external style (class) too like this (for example):
<p class="breakhere" style="margin: 2em 2em;">Text here.</p>
So there we have a CLASS that came from a style placed in the <head> and we've added an inline style for the margins of this paragraph as well.
But remember this: You CAN'T group classes in mobi 7 books. The first two generations of Kindle eReaders don't recognize CSS formatting, so KindleGen and other mobi converters convert CSS styles to HTML equivalents for them, but they will NOT properly render the styles as HTML for those older eReaders if you try to have more than one CSS class in an element. So you can have an inline style mixed with one internal class, but no more than that. You couldn't apply one class for text color and another for text size. But you CAN have as many properties/values as you want (for the most part) within ONE style whether it's internal, external, or inline. For instance, you could have a style declaration that addresses font color, size, type, indent etc. all with a single style. In the following I have one inline style consisting of one property (text) but with two values (indent and margin) separated by a semicolon. I could have as many properties and values as I wanted in this one style:
<p style="text-indent: 0em; margin: 0em 0em 1em 0em;">Text here.</p>
So I couldn't write "style" (indicating an inline style) a second time in that paragraph opening tag, nor could I write "class" twice to declare yet another style. I could, however, apply a second style from the head or an external sheet as a CLASS.
I can do this (a style and a class):
<p class="blockquote" style="margin: 2em 2em;">Text here.</p>
But not this:
<p style="blockquote" style="margin: 2em 2em;">Text here.</p>
Or this:
<p class="blockquote" class="margin: 2em 2em;">Text here.</p>
Lastly, if you want to apply a style to just a few words in a paragraph (or even just one letter), then you would use a "span." Here we'll just make the word "Spain" have a red font color:
<p>The rain in <span style="color:red">Spain</span> falls mainly on the plain.</p>
Remember to look at Amazon's guide to see which styles will and won't work. And they will degrade nicely to HTML entities for Kindle 1 and Kindle 2 eReaders.
This post just gives the basics of how CSS works. You'll never remember all the hundreds of styles available for web page elements, so it's good to invest in a good reference book. I highly recommend:
O'Reilly's Head First HTML With CSS & XHTML
Subscribe to:
Posts (Atom)