X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

RSS <enclosure> Element


RSS Reference Complete RSS Reference

Definition and Usage

The <enclosure> element allows a media-file to be included with an item.


Attributes

Attribute Description
length Required. Defines the length (in bytes) of the media file
type Required. Defines the type of media file
url Required. Defines the URL to the media file


Example

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">

<channel>
  <title>W3Schools Home Page</title>
  <link>http://www.w3schools.com</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3schools.com/rss</link>
    <description>New RSS tutorial on W3Schools</description>
    <enclosure url="http://www.w3schools.com/media/3d.wmv"
    length="78645" type="video/wmv" />

  </item>
</channel>

</rss>

Try it yourself »

RSS Reference Complete RSS Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook