RSS <image> 元素
定義和用法
<image> 元素指定一個(gè)圖片,用以與頻道一起顯示。
提示和注釋
注釋:該圖片必須是 GIF、JPEG 或 PNG 類型。
<image> 元素的子元素
標(biāo)簽 | 描述 |
---|---|
<description> | 可選。規(guī)定圖片鏈接的 HTML 標(biāo)題屬性中的文本。 |
<height> | 可選。定義圖像的高度。默認(rèn)是 31。最大值是 400。 |
<link> | 必需。定義提供該頻道的網(wǎng)站的超連接。 |
<title> | 必需。定義當(dāng)圖片不能顯示時(shí)所顯示的替代文本。 |
<url> | 必需。定義圖像的 URL。 |
<width> | 可選。定義圖像的寬度。默認(rèn)是 88。最大值是 144。 |
實(shí)例
<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0"> <channel> <title>W3School Home Page</title> <link>http://www.w3school.com.cn</link> <description>Free web building tutorials</description> <image> <url>http://www.w3school.com.cn/images/logo.gif</url> <title>w3school.com.cn</title> <link>http://www.w3school.com.cn</link> </image>
<item> <title>RSS Tutorial</title> <link>http://www.w3school.com.cn/rss</link> <description>New RSS tutorial on W3School</description> </item> </channel> </rss>