XML CSS


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.

cssemployee.css

Let's create the DTD file.

employee.dtd

Let's see the xml file using CSS and DTD.

employee.xml

Test it Now

CSS is not generally used to format XML file. W3C recommends XSLT instead of CSS.

Next TopicXML Schema




Latest Courses