Making the most out of Cascading Style Sheets
Command Line – CSS

© Lead Image © photovibes, 123RF.com
Cascading Style Sheets can provide a sophisticated layout for articles and books. Here are a few tips to get you started.
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.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.

News
-
Gnome’s Dash to Panel Extension Gets a Massive Update
If you're a fan of the Gnome Dash to Panel extension, you'll be thrilled to hear that a new version has been released with a dock mode.
-
Blender App Makes it to the Big Screen
The animated film "Flow" won the Oscar for Best Animated Feature at the 97th Academy Awards held on March 2, 2025 and Blender was a part of it.
-
Linux Mint Retools the Cinnamon App Launcher
The developers of Linux Mint are working on an improved Cinnamon App Launcher with a better, more accessible UI.
-
New Linux Tool for Security Issues
Seal Security is launching a new solution to automate fixing Linux vulnerabilities.
-
Ubuntu 25.04 Coming Soon
Ubuntu 25.04 (Plucky Puffin) has been given an April release date with many notable updates.
-
Gnome Developers Consider Dropping RPM Support
In a move that might shock a lot of users, the Gnome development team has proposed the idea of going straight up Flatpak.
-
openSUSE Tumbleweed Ditches AppArmor for SELinux
If you're an openSUSE Tumbleweed user, you can expect a major change to the distribution.
-
Plasma 6.3 Now Available
Plasma desktop v6.3 has a couple of pretty nifty tricks up its sleeve.
-
LibreOffice 25.2 Has Arrived
If you've been hoping for a release that offers more UI customizations, you're in for a treat.
-
TuxCare Has a Big AlmaLinux 9 Announcement in Store
TuxCare announced it has successfully completed a Security Technical Implementation Guide for AlmaLinux OS 9.