Style Sheets for Blogs: What’s the Purpose?

February 2, 2011

If you’re a seasoned blogger, you know about your style sheet and what it’s doing for your blog. But if you’re new at the game, you may not be sure what that style sheet does for you. This post deals with blog style sheets and WYSIWYG tools and how to keep them separate.

When you choose a style (or theme or template) for your blog, you get a set of style rules that determine appearance. Those rules are stored away from your blog posts and live in a document all their own. That’s where you want the style rules to be. Away from your blog post.

The style sheet sets up layout, colors, fonts and a lot more. With all that taken care of, all a blogger has to do is open up a new post window and start to type. You type your post,  publish it and you’re done. The style sheet makes it look nice in your published blog. All is right with the world.

Most blogs also have WYSIWYG (what you see is what you get) toolbars. Some you need to use to do formatting of text as headings or paragraphs or lists. Others let you change appearance. By changing appearance I mean you change the way something displays, but not the actual content. Maybe you want to change something from black to red. Just once. You can do that with the WYSIWYG toolbar provided above the post entry box. But it’s not a good idea to use those WYSIWYG appearance changing tools.

What happens when you do change a color or alignment as you are writing a post? Your blog software writes new appearance rules right in the blog post. These new rules override the appearance rules in your style sheet. Before you had appearance rules off in the style sheet where they belong. Now you have appearance rules in the blog post – not where they belong.

Why don’t you want style rules in the blog post?

Anything in your content – your blog post – can get picked up to use elsewhere. You want that to be your text and images: the headings, the paragraphs, the lists, the images. Your content.

You don’t want the blog post to contain style rules that could be carried over into unexpected places where they might not work such as mobile devices or other blogs that might quote your content. Appearance rules in those places could have unwanted effects.

Best Practice

The best practice is to choose a look you like as a template or theme and then leave it alone. Don’t use the provided toolbar to change fonts or colors or layout as you type your content into your blog. Use the tools to create headings and lists and blockquotes – that formats content into meaningful page elements – that’s okay. But font size or alignment or color choices are not meaningful. Instead, they deal with appearance. That’s not okay.

Leave a Reply