Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>HTML DOM Attributes</h1> <h2>The isId Property</h2> <p>Is the first attribute an id? The answer is:</p> <p id="demo"></p> <script> const element = document.getElementById("demo"); const answer = element.attributes[0].isId; element.innerHTML = answer; </script> <p>The isId property is no longer supported in any browsers.</p> <p>The isId property always returns indefined.</p> </body> </html>