Associating CSS with XML

Make use of processing instructions to associate a CSS stylesheet with XML.

<?xml-stylesheet type="text/css" href="document.css"?>
  • Use 'xml-stylesheet' to identify that this is a processing-instruction directed at stylesheet languages.

  • Use 'type="text/css"' to distinguish from other stylesheet languages.

  • Use 'href="document.css"' to identify the css stylesheet location.

  • Most browsers will follow this processing instruction.