HTML DOM Attribute isId

Example

Is the first attribute an id?

const isid = element.attributes[0].isId;
Try it Yourself »

Description

The isId property was once supported in Chrome, Firefox and Safari.

The isId property is no longer supported in any browser.

The isId property always returns undefined.

Alternative

Get the name of an attribute:

let aName = element.attributes[0].name;
Try it Yourself »

Syntax

attribute.isId

Return Value

undefined

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.