XML code in a HTML doc?

  powerless 22:23 31 Oct 05

link rel="alternate" title="Title" href="click here" type="text/xml" />

link rel="alternate" title="Title" href="click here" type="application/rss+xml" />


When adding the above to a HTML 4.01 Transitional doc. for the purpose of an RSS feed, the W3C does not validate the above saying that:

**The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).**

I think the later is the cause 'the use of XHTML syntax in HTML documents'.

Is there a way to make this validate in a HTML doc.?

I'm not to bothered about this as the RSS link appears and is active, the page looks the same but just wondered if there is a HTML equivalent of the XHTML syntax?

  powerless 22:25 31 Oct 05

I think that's correct.

This thread is now locked and can not be replied to.

Microsoft Surface PC release date, price and specs: All-in-one Surface PC to directly rival iMac

1995-2015: How technology has changed the world in 20 years

Best Photoshop video tutorials: 8 video tutorial websites for Photoshop

Apple's event invitations decoded: A look back at 16 of Apple's most cryptic invites | Clues in…