![]() |
|
| • All Online Courses • New Courses • QuickTips • Word Definitions • Submit a Tutorial • Links • |
|
Learn XML programming in this free XML training course How do you use attributes?Attributes can be used in a variety of ways, both to contain data and to help further define the data that’s held by elements. They can provide information that’s not included in the element itself but can make a difference in the way that processors handle the data. Consider the following example: <cat name=”Tooter”>Fat black cat</cat> The attribute, “Tooter” might be used to reference other information, ranging from links, to pictures, to additional information about everyone’s favorite fat black cat. Quotation marks must always be used with attributes, but it can be either single or double quotes. If the attribute data uses double quotes within it, you should use single quotes for the attribute itself; if it uses single quotes within it, use double for the attribute. Examples: <actor name=’Robert “Bob” Chapin’> <swordmaster name=”Robert ‘Bob’ Chapin”> Just be sure that you define your attributes before using them later, or else the processor might think that you’re trying to use an invalid element name.
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