![]() |
|
| • All Online Courses • New Courses • QuickTips • Word Definitions • Submit a Tutorial • Links • |
|
Learn XML programming in this free XML training course Section 3: XML StylesWhat are Cascading Style Sheets?Remember earlier when you referenced an XML processor, and sent the browser looking for a file called cats.css? The “css” part of the file that it was looking for indicated that it was what is known as a Cascading Style Sheet, which is a special type of file used in XML and some other markup languages to tell the browser how it should position and lay out the information that it has. In other words, it’s a sheet the browser uses to figure out the style of the layout. (What about the cascading part, you might ask? Well, the different parts of the layout can overlap.) Cascading Style Sheets (henceforth known as CSS) can be used to define a number of important items on the page… they can tell the browser what color a portion of text should be, where the section should be located, and any special instructions that the browser should follow when displaying any particular piece of data. While it’s true that all of that information could be coded onto the page itself, the use of a style sheet means that multiple pages with the same elements or layout can all reference the same file. This means that you don’t have to have all the same information on each and every page… something that saves on both loading time and coding time. One of the best things about CSS is the fact that they can be used by a multitude of languages, not just XML. You can create a CSS file that’s used to define how certain elements are formatted in an XML document, and then turn around and use it in a DHTML document (assuming that it doesn’t contain any information that DHTML isn’t able to use.) Of course, CSS does have drawbacks… after all, it’s ability to be used in conjunction with less-advanced coding languages means that it’s not as advanced as XML and some of its other formats are. CSS uses data as it encounters it in the document, and isn’t as adaptable as some other languages when dealing with XML. It is fairly common and has support in multiple browsers, however… and as long as you code with care, many of the drawbacks of using CSS can be easily avoided.
by John Casteele Find more free Internet tutorials from Learnthat.com. More Information:
Help us by rating this tutorial: [---] [--] [+] [++] [+++] [---] lowest; [+++] highest
|
|
||||||
![]() |
Learn: Free
Tutorials - Links
to Free Tutorials
Understand: Free Technical Definitions
- ExplainThat Whitepapers
Use: Certification Section -
Discussion Forum
Visit Our Network Sites:
About Us : Contact Us : Advertise : Privacy Information