DEV Community

Cover image for How HTML attributes become DOM object properties during page parse ?
Mehammed Teshome
Mehammed Teshome

Posted on • Edited on

How HTML attributes become DOM object properties during page parse ?

when a browser loads or parses a page most of the HTML attributes automatically become properties of DOM object. for example if there is a tag

,then the dom will have Dom.id="page" properties.

but the attribute-property mapping is not one-to-one. below we will see some of the things to consider.
  1. there are build-in Dom properties but we can add new properties too.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay