Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

Specifying Attributes

Added 26 Jul 2008

Adding attributes to an existing DTD is easy. For each attribute, you need to specify which element it goes with, what the attribute name is, what type of values it may have, and whether the attribute is optional or not. This information is specified in this model:

  elementName attributeName type optionalStatus
>

To add the maxlength attribute to the