Your routine might involve writing, in a comfortable app like MS Word. One might think that it would be harmless to simply copy text you’ve crafted into your website editor. Except that you may be copying some formatting along with that text. If you want your post to match the rest of your website, that formatting might just have to go.
Complexity is the enemy of compatibility
Your content needs to be understood in many contexts. There are hundreds of browsers, versions, platforms, and devices (think about the hundreds of models of printers, mobile devices, etc).
Each one of them has an opportunity to misunderstand a simple style command.
It is shocking but true, but not all browsers and devices understand much more than the bare minimum of styling instructions.
Here’s an example:
We set out to find which spreadsheet generates the simplest, most cross-browser compatible code. We had two spreadsheet programs lying around – Microsoft Excel, and Open Office.
First, code as pasted from Excel to generate a simple cell of centered data:
td width="140" bgcolor="#90b8d6" style="width: 140pt; text-align: center;"
Now, a code snippet from an OpenOffice table as pasted into CenterStage.
td align="CENTER" width="88" height="18"
Our code from Excel is clearly more complicated. The width is set in pt (points), which can cause frustrating spacing issues.
This was a simple example. As formatting instructions get more complicated, the difference in generated code grows greater.
Special Purpose Classes
Problems can also arise with special purpose classes and non-standard attributes.
For example, Excel and Word produce a series of special purpose classes called “MSO” classes.
Both Word and Internet Explorer understand the class name “MSO Normal”, because that is the “Normal” paragraph style as used in MSWord.
These MSO classes may be an agreed upon standard between those products, but this strategy only works if all your visitors browse your site with Microsoft products only.
Since this scenario is extremely unlikely, you might see how a compatibility problem can arise when Firefox, Opera, Safari, an iPhone, or your new Blackberry ignore these proprietary style commands and fall back to something really ugly or, at best, unintended.
Let’s not forget that our goal in posting content to the web is to communicate. Maybe even, to communicate as clearly as possible.
Of course, certain stylistic attributes can help communicate, but only if everyone can see them as the author intended.
Here are some tips for maximizing the readability of your content as pasted from other applications.
- Write and edit your page or post in plain text. Once you have a readable page, only then style your text. (You’ll also be a better writer for it)
- Use the “Paste from Word” button in your toolbar. When you “Paste From Word”, Center Stage knows to filter out the MSO classes.
- Paste plain text. Center Stage also has a “Paste as Plain Text” button. Start simple, complicate later.
- Use Open Office to paste in spreadsheets that you want rendered as tables.
Sometimes cut and paste just doesn’t cut it and what you see is not what your visitors get.
Keep it simple and remember why we write. To communicate. Wordpress and software like it is amazing technology, far better than cave walls or parchment paper. But at the end of the day, these are merely tools. Like all tools, they depend on a skilled user.