Latest web development tutorials

RSS item element

Each <item> element defines an RSS feed an article or "story".

<Item> element

Consider the following RSS document:

<? Xml version = "1.0" encoding = "ISO-8859-1"?>
<Rss version = "2.0">

<Title> W3Schools Home Page </ title>
<Link> </ link>
<Description> Free web building tutorials </ description>
<Title> RSS Tutorial </ title>
<Link> </ link>
<Description> New RSS tutorial on W3Schools </ description>
</ Item>
</ Channel>

</ Rss>

As previously mentioned, each <item> element defines an RSS feed an article or story ".

<Item> element has three required child elements:

  • <Title> - Defines the title of the project. (Eg RSS Tutorial)
  • <Link> - Hyperlink definitions arrive project. (Eg
  • <Description> - description of the project (such as w3school the RSS tutorial)

In addition, there are several <item> optional sub-elements, in the following we will introduce the most important ones.

<Author> element

<Author> element is used to specify a sub-project of the author's email address.

NOTE: In order to prevent spam, some developers do not use the <author> element.

On the above RSS document the project might be:


<Comments> element

<Comments> child element allows a project to connect to comment on this item.

Note the above RSS document project might look like this:


<Enclosure> element

<Enclosure> child element allows a media file with an item.

<Enclosure> element has three required attributes:

  • url - defined point to this media file URL
  • length - the length of the definition of this media file (byte)
  • type - the type of media file definitions

In the above RSS document is included in the project in the media file might look like this:

<enclosure url=""
length="5000" type="audio/mpeg" />

RSS <item> Reference

element description
<author> Optional. Author's email address specified projects.
<category> Optional. One or more categories define the project belongs.
<comments> Optional. To allow the project to connect to comment on this item (document).
<description> Required. Description of the project.
<enclosure> Optional. It allows a media file with an item.
<guid> Optional. Define a unique identifier for the project.
<link> Required. Define a hyperlink to this project.
<pubDate> Optional. Define the final release date for this project.
<source> Optional. Specify a third-party sources for this project.
<title> Required. Define the title of this item.