Constant width is used for:
Code examples and fragments.
Anything that might appear in an XML document, including element names, tags, attribute values, entity references, and processing instructions.
Anything that might appear in a program, including keywords, operators, method names, class names, and literals.
Constant-width bold is used for:
User input.
Signifying emphasis in code examples and fragments.
Constant-width italic is used for:
Replaceable elements in code statements.
Italic is used for:
New terms where they are defined.
Signifying emphasis in body text.
Pathnames, filenames, and program names. (However, if the program name is also the name of a Java class, it is written in constant-width font, like other class names.)
Host and domain names (cafeconleche.org).
TIP: This icon indicates a tip, suggestion, or general note.
WARNING: This icon indicates a warning or caution.
Significant code fragments, complete programs, and documents are generally placed into a separate paragraph like this:
<?xml version="1.0"?> <?xml-stylesheet href="person.css" type="text/css"?> <person> Alan Turing </person>
XML is case sensitive. The PERSON element is not the same thing as the person or Person element. Case-sensitive languages do not always allow authors to adhere to standard English grammar. It is usually possible to rewrite the sentence so the two do not conflict, and when possible we have endeavored to do so. However, on rare occasions when there is simply no way around the problem, we let standard English come up the loser.
Finally, although most of the examples used here are toy examples unlikely to be reused, a few have real value. Please feel free to reuse them or any parts of them in your own code. No special permission is required. As far as we are concerned, they are in the public domain (though the same is definitely not true of the explanatory text).
Copyright © 2002 O'Reilly & Associates. All rights reserved.