RSS is not dead. It is not mainstream, but it’s still a thriving protocol, especially among tech users. However, many people do not know what RSS feeds are or how to use them. Most browsers render RSS as raw XML files, which doesn’t help users understand what it’s all about:

XML example as rendered in Chrome

In this post, I’ll explain how to style RSS feeds and educate readers at the same time.

XSL(T) to the rescue

This is how the RSS feed for this blog looks like:

A styled RSS feed preview. It contains an alert box with a short description about RSS feeds and a list of blog post titles and dates.

To style a raw XML file in a browser, you have to provide styling information. You can do that by attaching an xml-stylesheet processing instruction within the RSS feed:

<feed xmlns=""

The href attribute specifies a URL to a valid XSL file. You can check out mine for inspiration. Here’s the gist:

<xsl:stylesheet version="3.0"
  <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
  <html xmlns="" lang="en">
        RSS Feed | <xsl:value-of select="/atom:feed/atom:title"/>
      <link rel="stylesheet" href="/assets/styles.css"/>
        This is an RSS feed. Visit
        <a href="">About Feedsa>
        to learn more and get started. It’s free.
      <h1>Recent blog postsh1>
      <xsl:for-each select="/atom:feed/atom:entry">
          <xsl:attribute name="href">
            <xsl:value-of select="atom:link/@href"/>
          <xsl:value-of select="atom:title"/>
        Last updated:
        <xsl:value-of select="substring(atom:updated, 0, 11)" />

This code is inspired by pretty-feed-v3, but I’ve adopted it for the Atom specification.

The XSL file transforms the XML feed into a valid HTML document that any browser can render. You can use any information included in the XML file and put it into a new markup structure. You can even include content that is not part of the XML feed. A perfect use case is to include a note about what RSS feeds are and how to use them (as shown in the example above).

You can define inline CSS styles with a regular