| Keyword | Associated type | Comment | Default value |
| string | <string> | The attribute value is parsed as a CSS <string> | An empty string |
| color | <color> | The attribute value is parsed as a hash (3- or 6-value hash) or a keyword. It must be a valid CSS <string> value. Leading and trailing spaces are stripped. | currentColor |
| url | <uri> | The attribute value is parsed as a string that is used inside a CSS url()function. Relative URL are resolved relatively to the original document, not relatively to the style sheet. Leading and trailing spaces are stripped. | The url about:invalid that points to a non-existent document with a generic error condition. |
| integer | <integer> | The attribute is parsed as a CSS <integer>. If it is not valid, that is not an integer or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0, or, if 0 is not a valid value for the property, the property’s minimum value. |
| number | <number> | The attribute is parsed as a CSS <number>. If it is not valid, that is not a number or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0, or, if 0 is not a valid value for the property, the property’s minimum value. |
| length | <length> | The attribute is parsed as a CSS <length> dimension, that is including the unit (e.g. 12.5em). If it is not valid, that is not a length or out of the range accepted by the CSS property, the default value is used. If the given unit is a relative length, attr()computes it to an absolute length. Leading and trailing spaces are stripped. | 0, or, if 0 is not a valid value for the property, the property’s minimum value. |
| em, ex, px, rem, vw, vh, vmin, vmax, mm, cm, in, pt, or pc | <length> | The attribute is parsed as a CSS <number>, that is without the unit (e.g. 12.5), and interpreted as a <length> with the specified unit. If it is not valid, that is not a number or out of the range accepted by the CSS property, the default value is used. If the given unit is a relative length, attr()computes it to an absolute length. Leading and trailing spaces are stripped. | 0, or, if 0 is not a valid value for the property, the property’s minimum value. |
| angle | <angle> | The attribute is parsed as a CSS <angle> dimension, that is including the unit (e.g. 30.5deg). If it is not valid, that is not an angle or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0deg, or, if 0deg is not a valid value for the property, the property’s minimum value. |
| deg, grad, rad | <angle> | The attribute is parsed as a CSS <number>, that is without the unit (e.g. 12.5), and interpreted as an <angle> with the specified unit. If it is not valid, that is not a number or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0deg, or, if 0deg is not a valid value for the property, the property’s minimum value. |
| time | <time> | The attribute is parsed as a CSS <time> dimension, that is including the unit (e.g. 30.5ms). If it is not valid, that is not a time or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0s, or, if 0s is not a valid value for the property, the property’s minimum value. |
| s, ms | <time> | The attribute is parsed as a CSS <number>, that is without the unit (e.g. 12.5), and interpreted as an<time> with the specified unit. If it is not valid, that is not a number or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0s, or, if 0s is not a valid value for the property, the property’s minimum value. |
| frequency | <frequency> | The attribute is parsed as a CSS <frequency> dimension, that is including the unit (e.g. 30.5kHz). If it is not valid, that is not a frequency or out of the range accepted by the CSS property, the default value is used. | 0Hz, or, if 0Hz is not a valid value for the property, the property’s minimum value. |
| Hz, kHz | <frequency> | The attribute is parsed as a CSS <number>, that is without the unit (e.g. 12.5), and interpreted as a <frequency> with the specified unit. If it is not valid, that is not a number or out of the range accepted by the CSS property, the default value is used. Leading and trailing spaces are stripped. | 0Hz, or, if 0Hz is not a valid value for the property, the property’s minimum value. |
| % | <percentage> | The attribute is parsed as a CSS <number>, that is without the unit (e.g. 12.5), and interpreted as a <percentage>. If it is not valid, that is not a number or out of the range accepted by the CSS property, the default value is used. If the given value is used as a length, attr()computes it to an absolute length. Leading and trailing spaces are stripped. | 0%, or, if 0% is not a valid value for the property, the property’s minimum value. |