RSS <image> 元素

定义和用法

<image> 元素指定一个图片,用以与频道一起显示。

提示和注释

注释:该图片必须是 GIF、JPEG 或 PNG 类型。

<image> 元素的子元素

标签 描述
<description> 可选。规定图片链接的 HTML 标题属性中的文本。
<height> Optional. Defines the height of the image. The default is 31. The maximum value is 400.
<link> Required. Defines the hyperlink of the website providing the channel.
<title> Required. Defines the alternative text displayed when the image cannot be displayed.
<url> Required. Defines the URL of the image.
<width> Optional. Defines the width of the image. The default is 88. The maximum value is 144.

Example

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
  <title>CodeW3C.com Home Page</title>
  <link>http://www.codew3c.com</link>
  <description>Free web building tutorials</description>
  <image>
    <url>http://www.codew3c.com/images/logo.gif</url>
    <title>codew3c.com</title>
    <link>http://www.codew3c.com</link>
  </image>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.codew3c.com/rss</link>
    <description>New RSS tutorial on CodeW3C.com</description>
  </item>
</channel>
</rss>