HTML Tags in RSS "channel/item/description"


How to enter HTML Tags in RSS "channel/item/description"?



In most cases, the "channel/item/description" XML element should contain a text string describing the RSS feed item without HTML tags.

But sometimes, you would like to include HTML tags in the "channel/item/description" XML element, to provide images and hyper links in the RSS feed item.

Since an RSS document is an XML document, all angle brackets of HTML tags must be coded as XML entities. For example, here is an RSS feed item:

<rss version="2.0">
   <title>Visual Studio 2017 .NET Program Folders</title>
   <description>&lt;img align='left' width='64' height='64' 
src='' /&gt;In which 
folders Visual Studio 2017 .NET programs are located on my Windows 
computer? When Visual Studio 2017 .NET is installed on your Windows 
computer, its programs are located the following folders: .NET Framework 
location: C:\Program Files (x86)\Microsoft.NET .NET Framework support for 
Visual St...  - Rank: 110; Updated: 2017-09-19 02:44:09 -> &lt;a 

As you can see, the "description" element contains 2 HTML tags: <img ...> and <a ... >. But they have to be encoded as &lt;img ...&gt; and &lt;a ...&gt;.

When the above RSS feed item is displayed in an RSS viewer, the encoded HTML tags will be respected as shown below:
HTML Tags in RSS channel/item/description


RSS specifications

⇒⇒RSS FAQ and Tutorials

2017-09-24, 106👍, 0💬