HTML and CSS Reference
In-Depth Information
Provide feed information, including the required title , link , and description elements,
as well as optional elements such as lastBuildDate and language .
1.
<title> John Smith photography </title>
<link> http:// example.com/ </link>
<description> The news feed of Alaskan photographer John Smith. </description>
<lastBuildDate> Fri, 10 Feb 2012 14:47:00 GMT-0900 </lastBuildDate>
<language> en-US </language>
2.
Provide news items. To create a valid RSS 2.0 feed channel with the highest level of
interoperability, each item should have the following elements: title , link , description ,
pubDate , and guid .
<item>
<title> Photo exhibition </title>
<link> http://example.com/events/ </link>
<pubDate> Fri, 10 Feb 2012 14:47:00 GMT-0900 </pubDate>
<dc:creator>John Smith</dc:creator>
<category>Events</category>
<guid> http://example.com/events/ </guid>
<description> Best shots of 2011 </description>
<content:encoded><![CDATA[ My photo exhibition
<a href="http://example.com/events/">Best shots of 2011</a> takes place at the
Moose Hotel in Anchorage, AK, USA on 17-18 February 2012. ]]></content:encoded>
</item>
This is the section that can be copy-pasted and then modified each time the feed channel is
updated with the latest news. The next news should be provided before the latest one, that is,
earlier in the source code.
3.
Validate.
4.
Share. News feeds are usually used by linking to the XML file that contains them. 5 To use
the built-in RSS reader of modern browsers, a link should be provided in the (X)HTML
document head. Here's an example:
<link rel="alternate" type="application/rss+xml" title="John Smith photography"
href="http://www.example.com/rss.xml" />
This makes it possible for browsers to recognize that the current web page has an RSS news feed.
Making Web Sites Valid Through Redesign
The stricter the markup, the easier to upgrade it to a newer markup version. However, in certain cases, migrating to
another standard is not feasible without completely rewriting the site. Regarding style sheets, valid CSS 2.1 can be
easily extended with CSS3 features in most cases. Still, standardizing an existing site can be a difficult task.
5 Another option is to retrieve the desired number of channel items with scripting. If you want to publish the latest news as part of a
web page rather than a separate file, you need a script that opens the file, retrieves the contents of the news feed items, and
generates the corresponding markup code.
 
Search WWH ::




Custom Search