How to add CSS in XML File ? Last Updated : 10 Apr, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report XML stands for Extensible Markup Language. It is a dynamic markup language. It is used to transform data from one form to another form. In this article, we will discuss how to add CSS in the XML file. The CSS can be used to display the contents of the XML document in a clear and precise manner. It gives the design and style to a whole XML document. Syntax <?xml-stylesheet type="text/css" href="student.css"?> Example 1: XML File XML <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="student.css"?> <class> <heading>Welcome To GeeksforGeeks Class </heading> <student> <name>Akshit</name> <Address>Moradabad</Address> <PhoneNumber>123456</PhoneNumber> </student> <student> <name>Nikita</name> <Address>Lucknow</Address> <PhoneNumber>876456</PhoneNumber> </student> <student> <name>Somya</name> <Address>Delhi</Address> <PhoneNumber>124556</PhoneNumber> </student> <student> <name>Eshika</name> <Address>Meerut</Address> <PhoneNumber>100056</PhoneNumber> </student> <student> <name>Kalpana</name> <Address>Rampur</Address> <PhoneNumber>1299456</PhoneNumber> </student> </class> Â Â Filename: student.css css class{ color: white; background-color : gray; width: 100%; } heading { color: green; font-size : 40px; background-color : powderblue; } heading,name,PhoneNumber,address { display : block; } name{ font-size : 25px; font-weight : bold; } Output: Example 2: XML file XML <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="student.css"?> <Game_List> <heading>Welcome To GeeksforGeeks Games Club</heading> <Game> <name>GTA Vice City</name> <description>Hello! Lets Win!!</description> </Game> <Game> <name>Need For Speed</name> <description>Hello! Lets drive crazy!</description> </Game> <Game> <name>GTA San Andreas</name> <description>Hello! Lets fly together!</description> </Game> <Game> <name>Call of Duty</name> <description>Hello! Lets kill the enemy!</description> </Game> <Game> <name>PUBG</name> <description>Hello! Lets have a chicken dinner!</description> </Game> </Game_List> Â Â Filename: student.css css heading { color: green; font-size : 40px; background-color : powderblue; } Game_List{ width: 100%; } Game{ background-color:yellow; } heading,name,description{ display : block; } name{ font-size : 25px; font-weight : bold; } description{ font-family:cursive; color:red; } Output: Comment More infoAdvertise with us Next Article How to add CSS in XML File ? A akshitsaxenaa09 Follow Improve Article Tags : CSS Geeks-Premier-League-2022 HTML and XML CSS-Properties Similar Reads How To Add Font In CSS? Adding fonts to a website enhances its design and readability. In CSS, custom fonts can be applied using several techniques that allow web designers to include specific fonts that arenât system defaults.PrerequisitesHTMLCSSThese are the approaches to add a font in CSS: Table of ContentUsing web-safe 2 min read How to open an XML file ? XML stands for eXtensible Markup Language. It defines the format of data and it is similar to HTML as both are markup languages but while HTML has a predefined set of standard tags, XML has user-defined tags, although has a starting standard tag: <?xml version=â1.0â encoding=âUTF-8â?>XML is a 3 min read How to add .css file to ejs Styling is one of the most important parts of web development as it enhances the visual appearance of a website. In today's era visual presentation of content holds immense importance. EJS, short for Embedded JavaScript offers a seamless integration of JavaScript functionality within HTML templates. 3 min read How to Add CSS Adding CSS (Cascading Style Sheets) to your HTML is essential for creating visually appealing and user-friendly web pages. In this guide, we will explore the three primary methods to link CSS to HTML documents: inline, internal, and external CSS. Each method has its advantages and best-use scenarios 3 min read How to Include CSS Files in Vue2 ? VueJS is one of the greatest frameworks for JavaScript similar to ReactJS. The user interface layer is designed with VueJS. When working with Vue2, styling your components is an essential aspect of creating a visually appealing and user-friendly application. In Vue2 you can include CSS files in vari 4 min read Like