Difference between Attribute and Property in HTML world

  • Some HTML attributes don’t have corresponding properties; for example, aria-*.
  • Some DOM properties don’t have corresponding attributes; for example, textContent.
<input type="text" value="Name:">
<input id="inputId" type="text" value="Name:">

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store