Attribute Declarations

 <  Day Day Up  >  


Once an element's syntax has been defined, we have to address its attributes. All attribute declarations begin with the keyword ATTLIST followed by the element name, attribute name , attribute type, and default data information, as you can see in the following:

  <!ATTLIST element-name attribute-name attribute-type default-data>  

The HTML 4.0 <BDO> tag type illustrates a small attribute declaration:

  <!ATTLIST   BDO   lang  NAME      #IMPLIED   dir  (ltrrtl)  #REQUIRED   >  

The XML syntax that defines the <bdo> tag under XHTML is similar but you should notice that more attributes are not available for this tag

  <!ATTLIST bdo   %coreattrs;   %events;   lang        %LanguageCode; #IMPLIED   xml:lang    %LanguageCode; #IMPLIED   dir         (ltrrtl)      #REQUIRED   >  


 <  Day Day Up  >  


HTML & XHTML
HTML & XHTML: The Complete Reference (Osborne Complete Reference Series)
ISBN: 007222942X
EAN: 2147483647
Year: 2003
Pages: 252
Authors: Thomas Powell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net