DEV Community

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

Posted on • Updated 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)