From e235dc168705502944d175bbc3440ff851e169ea Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Tue, 4 Aug 2009 10:46:13 -0700 Subject: [PATCH] show an element with two attributes --- xml.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml.html b/xml.html index fbb5723..e97df5b 100755 --- a/xml.html +++ b/xml.html @@ -120,16 +120,16 @@ mark{display:inline}

Elements can have attributes, which are name-value pairs. Attributes are listed within the start tag of an element and separated by whitespace. Attribute names can not be repeated within an element. Attribute values must be quoted. You may use either single or double quotes. -

<foo lang='en'>          
-  <bar lang="fr"></bar>  
+
<foo lang='en'>                          
+  <bar id='papayawhip' lang="fr"></bar>  
 </foo>
 
  1. The foo element has one attribute, named lang. The value of its lang attribute is en. -
  2. The bar element has one attribute, named lang. The value of its lang attribute is fr. This doesn’t conflict with the foo element in any way. Each element has its own set of attributes. +
  3. The bar element has two attributes, named id and lang. The value of its lang attribute is fr. This doesn’t conflict with the foo element in any way. Each element has its own set of attributes.
-

If an element has more than one attribute, the ordering of the attributes is not significant. An element’s attributes form an unordered set of keys and values, like a Python dictionary. +

If an element has more than one attribute, the ordering of the attributes is not significant. An element’s attributes form an unordered set of keys and values, like a Python dictionary. There is no limit to the number of attributes you can define on each element.

Elements can have text content.