hotfeed

Don’t use CSS to vehicle information

The bad news is that you are probably doing it.

Custom styles in css files are great, but you should use them only for styling purpose, and never as a primary information source, because styles are aften lost when the post is republished via rss or other channels.

I’ve seen too many times things like

I highlighted the name of my cat: Mishra, Pinzi, Sleepy

… If you read it with an RSS reader (try it), this does not make any sense, you have to go to the original Is Your CSS Tricking You webpage to understand what’s the name of my cat! (I really have that cat ;) )

Now, there’s a very simple way to have both a nice looking site and a usable rss without linking a css to the xml rss file: use both your custom styles and the default html tags when you want to reach also your feed readers.

Look at this:

Bad – Good

The code I wrote is

<p class="important">Bad - <strong>Good</strong></p>

On my browser they look exactly the same, but using an rss reader they do not…

My “important” style is unknown by the rss reader, so in the rss reader “Bad” is styled with the default font…
“Good” instead, being tagged by both my style and <strong> is highlighted also in the RSS reader, so you can still understand that is important.

This is a real simple tip that can really improve your reader’s experience and your feed, if you liked it you may be intrested in other feed-related from my feed week.

francesco mapelli