From the course: XML Essential Training (2018)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Styling XML tags

Styling XML tags - XML Tutorial

From the course: XML Essential Training (2018)

Start my 1-month free trial

Styling XML tags

- [Teacher] Now let's take a look at a slightly more advanced example of associating CSS style sheets with XML. Let's open up the businesscard_nostyle.xml. So this is the business card XML data that I showed as a theoretical example previously. And as we did in the previous example, let's associate a style sheet with our XML. So remember to do this I have to type the brackets, question mark, and I'll say xml-stylesheet and again the type is going to be text/css, and this time I'm going to point to the businesscard.css file, and I'll close off the processing instruction there. All right, so again, so far not any different than what we did in the previous exercise, so let's go and view this in the browser. So I'm going to right click on this and open it in Chrome. And so now you can see the XML has an appearance, but all the contents of the business card are kind of just jumbled together. They're not on their own lines, you know they're all squished up, they're not labeled properly, so…

Contents