Skip to Content
How to Build an RSS 2.0 Feed
book

How to Build an RSS 2.0 Feed

by Mark Woodman
November 2006
Intermediate to advanced
46 pages
1h 7m
English
O'Reilly Media, Inc.
Content preview from How to Build an RSS 2.0 Feed

RSS Best Practices

Although we have discussed many best practices at the element level in the last chapter, there are several general considerations and limitations you should keep in mind when building an RSS feed.

Cascading Style Sheets in RSS

If you want fine-tuned control over the formatting of HTML in your RSS feed, it would seem to be a natural fit to use Cascading Style Sheets (CSS). CSS is widely regarded across the web as the formatting mechanism of choice for HTML. (See http://www.w3schools.com/css/ for more information.)

The good news is that you can put CSS in your feed's HTML. The bad news is that many online feed readers (like Bloglines or NewsGator Online) will strip it out. The online readers do this because CSS can pose security risks or disrupt their own styles and layouts. Thus, unfortunately, much of the formatting work you do may not be viewed by your readers.

For this reason, it is generally a good idea to make your RSS content conform to a simple layout that can still look okay if the CSS is removed. For web designers, this will feel like a step backward (and it is), but it is unfortunately necessary. This means you shouldn't rely on CSS for text columns, font formatting, or image placement. Wherever you can, use basic HTML markup for formatting instead.

JavaScript in RSS

There are many wonderful uses of JavaScript on the web today, used for everything from simple form validation to AJAX techniques. JavaScript on your own web site is perfectly appropriate and typically ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Streams, Walls, and Feeds: 109 Design Guidelines for Improving Notifications, Messages, and Alerts Sent Through Social Networks and RSS

Streams, Walls, and Feeds: 109 Design Guidelines for Improving Notifications, Messages, and Alerts Sent Through Social Networks and RSS

Nielsen Norman Group
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9780596529383Catalog PageErrata