Use of CSS in XML document

What is the use of CSS in XML document? How will you create CSS for a particular XML file?

Questions by mukulverma2408

Showing Answers 1 - 3 of 3 Answers

Firstly this is the way we can refer to the CSS file created for the existing xml document.

Code
  1. <?xml version="1.0" encoding="ISO-8859-1"?>

  2. <?xml-stylesheet type="text/css" href="mybookstyle.css"?>

  3. <books>

  4. <book>physics</book>

  5. <book>chemistry</book>

  6. <book>mathematics</book>

  7. </books>


And here is my CSS - a text file saves as mybookstyle.css

Code
  1. books {background-color: #ffffff; width: 100%;}

  2. book {display: block; margin-bottom: 30pt; margin-left: 0;}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions