XML - Attribute

Card Puncher Data Processing


Attribute in XML represents the (tree) attributes of an HTML element (node in the tree)

Ie they are used to associate name-value pairs with elements and are defined in a start tag of an empty tag.

The Name-Value pairs are referred to as the attribute specifications of the element.

In HTML, they are characteristics or descriptions for the content in the element.


<termdef id="dt-dog" term="dog">

This Xml start tag defines:

  • for the attribute name “id” the attribute value “dt-dog”
  • for the attribute name “term” the attribute value “dog”

HTML Specification: The attribute value can remain unquoted if it doesn't contain space characters or any of “ ' ` = < or >. Otherwise, it has to be quoted using either single or double quotes. The value, along with the ”=“ character, can be omitted altogether if the value is the empty string.

<!-- empty attributes -->
<input name=address disabled>
<input name=address disabled="">

<!-- attributes with a value -->
<input name=address maxlength=200>
<input name=address maxlength='200'>
<input name=address maxlength="200">


All the attributes of an element are called the attribute list.

The list of supported attribute for an element can be defined in the attribute-list declaration


An Attribute-list declaration is a declaration that specify the list of possible attribute for an element.

See attribute-list declaration for an example.

Documentation / Reference

Discover More
Dom Attribute Set To Color Red
Attribute manipulation with DOM

How to add, delete, get any node attribute with the DOM
CSS - Style declaration (Inline - (External|Internal) Style sheet)

There is three ways to specify CSS rules in HTML: External style sheet with the link element Internal style sheet with the style element Inline style or inline CSS with the style attribute ...
HTML - Attribute

HTML An attribute in HTML is an XML attribute of an HTML element Attribute names are TR/html-markup/documents.htmlcase-insensitive. Classes and IDs are attributes used in the selection of element....
Chrome Devtool Selector
How to select elements based on attribute ? (with the css selector API)

How to select elements based on attribute ? (with the selector API , css) API This page is about selector expressions that select elements based on attribute. * An ID selector and a class selector...
Data System Architecture
Tree - Attribute

A value associated with an node (element) of a tree, consisting of a name, and an associated (textual) value.
Card Puncher Data Processing
XML - (Markup) Declaration (validation|constraint)

The element structure of an XML document may, for validation purposes, be constrained using: element type and declarations defined in the doctype: inlined or externally via dtd file These...
Card Puncher Data Processing
XML - (Structure|Representation)

Each XML document has both: a and a structure. XML provides a mechanism, the document type declaration: to define constraints on the logical structure and to support the use of predefined...
Card Puncher Data Processing
XML - Element

Each XML document contains one or more elements, the boundaries of which are either delimited by: start-tags and end-tags, or, for empty elements, by an empty-element tag. The element structure...
Card Puncher Data Processing
XML - Notation

Notations identify by name the format of unparsed entities, the format of elements which bear a notation attribute, or the application to which a processing instruction is addressed. Notation...
Card Puncher Data Processing
XML - doctype

doctype is a DTD schema definition. It MUST appear before the first element in the document. The HTML doctype: Example of attribute declarations ...

Share this page:
Follow us:
Task Runner