RSS <image> 元素
定義和用法
<image> 元素指定一個圖片,用以與頻道一起顯示。
提示和注釋
注釋:該圖片必須是 GIF、JPEG 或 PNG 類型。
<image> 元素的子元素
標簽 | 描述 |
---|---|
<description> | 可選。規定圖片鏈接的 HTML 標題屬性中的文本。 |
<height> | 可選。定義圖像的高度。默認是 31。最大值是 400。 |
<link> | 必需。定義提供該頻道的網站的超連接。 |
<title> | 必需。定義當圖片不能顯示時所顯示的替代文本。 |
<url> | 必需。定義圖像的 URL。 |
<width> | 可選。定義圖像的寬度。默認是 88。最大值是 144。 |
實例
<?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>