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.tw</link>
<description>免費網頁製作教程</description>
<image>
<url>https://w3schools.tw/images/logo.gif</url>
<title>W3Schools.com</title>
<link>https://w3schools.tw</link>
</image>
<item>
<title>RSS 教程</title>
<link>https://w3schools.tw/xml/xml_rss.asp</link>
<description>W3Schools 上的新 RSS 教程</description>
</item>
</channel>
</rss>
自己動手試一試 »
❮ 完整的 RSS 參考