Purpose of CSS in XML
CSS (Cascading Style Sheets) can be used to add style and display information to an XML document. It can format the whole XML document.
How to link XML file with CSS
To link XML files with CSS, you should use the following syntax:
XML CSS Example
Let's see the css file.
Let's create the DTD file.
Let's see the xml file using CSS and DTD.
employee.xmlTest it Now
CSS is not generally used to format XML file. W3C recommends XSLT instead of CSS.