hasAtt[ForStartTag]() (tick_24Validator Engine Only)

int hasAtt(string $att1[, string $att2...])

Returns the attribute index (1 or greater) of the first attribute with the name $attx that exists, else returns 0.

Use in tag name start, attribute, and attribute value programs to quickly determine whether attributes have been used (with or without a value).

This function has changed in v10.9924 and later; it now returns the attribute index of the first attribute found instead of always returning 1 if any attribute is found (this provides more useful information)

This function is supported by CSE HTML Validator v10.00 and later.

int hasAttForStartTag(string $attribute)

Returns 1 if $attribute exists in the start tag, else returns zero.

Use only in tag name end programs.

May require that runProgram(21) be used in the start tag name program.

This function is supported by CSE HTML Validator v8.00 and later. In versions previous to v11.0114, this functions was hasAttStartTag() (which still works).