Element does not carry attribute
An attribute declared #REQUIRED in the DTD is missing.
The message, as the validator reports it
Element note does not carry attribute id
Why it happens
- The attribute was left out or misspelt.
How to fix it
Add the attribute. For an ID attribute the value must be a name (it may not start with a digit) and unique in the document.
Example
Validated against note.dtd, below.
Reports the error
<note>
<to>Ana</to>
<body>Hi</body>
</note>
Fixed
<note id="n1">
<to>Ana</to>
<body>Hi</body>
</note>
note.dtd
<!ELEMENT note (to, body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT body (#PCDATA)>
<!ATTLIST note id ID #REQUIRED>