Making the most out of Cascading Style Sheets

If you have created HTML or JavaScript in the last two decades, you probably have a nodding familiarity with Cascading Style Sheets (CSS) [1]. Not only is the CSS stylesheet language commonplace on the Internet, but popular ebook formats like EPUB and MOBI use it as well. Moreover, because CSS is human-readable, if you know English, you can understand much of what is being done without learning the details. However, a formal look at CSS is likely to reveal missed details, not least of which is the number of options it provides.

CSS keeps format and content separate. Initially, markup languages like HTML were designed to do the same, but the distinction became blurred (if you are old enough, you may remember the infamous HTML blink tab). CSS was intended to restore the distinction by being a stylesheet that gave designers control over how pages are viewed. CSS has been only partly successful, because different web browsers continue to display some elements differently and to allow readers to override CSS with their own preferences. All the same, CSS remains popular, if only because most designers prefer to have some formatting control.

At any rate, CSS continues to be a standard feature of modern computing. Its specifications are developed and maintained by the World Wide Web Consortium (W3C), which also provides a CSS validation service [2]. However, be aware that different CSS uses, such as ebook publication on Amazon or Lulu, often have their own, sometimes arbitrary, standards for CSS stylesheets. A given stylesheet can be valid by W3C standards yet still fail to be accepted by a given publisher. It's time, though, for a closer look at CSS constructions.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Cascading Style Sheets

    Cascading Style Sheets (CSS) help you polish up your websites without taking a crash course in programming.

  • Font Manager

    Font Manager makes it simpler to find the specific font you're looking for and to compare font options side by side.

  • CSS Tricks

    Cascading Style Sheets (CSS) can do much more than define the color and font of your web text. We'll show you how to build the power of CSS into your web creations.

  • Workspace – Ebook Publishing

    The right tools can make the process of authoring an ebook less laborious and time consuming. We look at several ebook authoring applications and show how to put them to practical use.

  • Workspace: HTML-Based Presentations

    You can whip up great-looking HTML-based presentations that run in a regular browser using just a text editor.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News