RSS <image> 元素
❮ 完整的 RSS 参考
定义和用法
The <image> element allows an image to be displayed when aggregators present a feed. (元素允许在聚合器展示 feed 时显示图像。)
提示和注释
注意: 图像必须是 GIF、JPEG 或 PNG 类型。
<image> 的子元素
标签 | 描述 |
---|---|
<description> | 可选。指定图像周围链接的 HTML title 属性中的文本 |
<height> | 可选。定义图像的高度。默认值为 31。最大值为 400 |
<link> | 必需。定义指向提供频道的网站的超链接 |
<title> | 必需。定义在图像无法显示时显示的文本 |
<url> | 必需。指定图像的 URL |
<width> | 可选。定义图像的宽度。默认值为 88。最大值为 144 |
示例
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>W3Schools 主页</title>
<link>https://w3schools.org.cn</link>
<description>免费网页制作教程</description>
<image>
<url>https://w3schools.org.cn/images/logo.gif</url>
<title>W3Schools.com</title>
<link>https://w3schools.org.cn</link>
</image>
<item>
<title>RSS 教程</title>
<link>https://w3schools.org.cn/xml/xml_rss.asp</link>
<description>W3Schools 上的新 RSS 教程</description>
</item>
</channel>
</rss>
自己动手试一试 »
❮ 完整的 RSS 参考