
My second paragraph that is left-justified. My first paragraph that is aligned to the left. To reference the CSS file for a particular HTML file, you simply add a link element into the head section of the HTML. This is extremely useful for troubleshooting. If you are using a good text editor like Notepad++, the syntax formatting and coloring will appear different than the HTML file. The content of the CSS file would simply be one line of text in this case: Simply create a new file in your text editor called anyname. The final approach and the one recommended by this guide is using an external stylesheet. Using the style attribute requires you to make changes within every HTML element you want to change. To each their own.This method is not recommended, since the major benefit of utilizing CSS is to not have to rewrite dozens of lines of code.

There is some debate over whether left-justified or fully-justified text is better in eBooks.

However, you should be aware of the other two methods.Īs an example, we would like to apply the following CSS, which makes any content in a element be left-justified: There are three basic ways to apply CSS presentation to your HTML, and only one is recommended-using an external stylesheet with a. It is recommended that you learn the easier ways to style CSS (such as changing the font size) and then work your way onto the complexities. The new CSS3 specification is powerful and supports a variety of complex features such as box shadows, rounded corners, and even animation. You can even completely hide content on the e-ink Kindles that would appear on the Kindle Fire, and vice versa. This is handy, because the Kindle Fire can support more advanced CSS (such as floating images and drop caps) that would create problems on the older Kindles. In regards to the Kindle format, CSS can be used to apply styles specifically for the older e-ink Kindles or the Kindle Fire without changing the HTML. Do yourself a favor and save a vast amount of time by learning CSS. For CSS you only have to make one change to alter the indents on all of these paragraphs. If you're like the author, you would probably make one or two mistakes along the way resulting in some goofy indents on those paragraphs. What if you had dozens of paragraphs indented the same way in a lengthy novel, and you wanted to make a small modification to each of those indents? If your presentation was coded into the HTML, you would have to go through each paragraph tag and make the necessary changes.
#Bookworm game for kindle fire code#
This is because many elements of content on a given website have the exact same type of styling, and it is much easier to change the code in a single CSS file than alter every single element of the HTML.Īs an eBook designer, it is even more important to separate presentation and content.

#Bookworm game for kindle fire professional#
While the differences may be somewhat trivial, utilizing different styles can aid the reader in focusing their attention on certain portions of content and giving your eBook a professional look.ĭuring the early years of web development, it became a fundamental axiom to separate content (HTML) and presentation (CSS) from each other. You will notice that the first paragraph is indented on the first line, the second has a different font, and the third is fully justified (aligned on both sides) rather than left-justified (aligned on the left side only). This is accomplished by applying different rules, which are called declarations, to elements within your HTML that alter how the marked-up content appears to the reader.Īs an example, here is an image of three different paragraphs that each has its own presentation or style: Cascading Style Sheets (or CSS) is a way to add presentation to your eBook's content.

While nothing is more important than the actual written word, fixing it up with typographical best practices is a way to show your readers that your eBook is professional. Introduction to CSS for the Kindle FireUp until now in the guide, you have learned about using HTML markup to add content into your eBook. Looking for a complete guide on eBook design and development? Please consider The eBook Design and Development Guide, which contains everything you need to know about HTML, CSS, EPUB, and MOBI/KF8 to make an eBook like a pro.
