DEV Community

Vijay SRJ
Vijay SRJ

Posted on • Originally published at


Attribute vs Property in HTML

The terms attribute and property can be confusing in HTML.

For example the javascript framework Angular has the concepts Property Binding and Attribute Binding . Without knowing the difference between the two it is difficult to grasp the difference between those concepts.

The major difference between the two is this:

Attribute is related to HTML

Property is related to DOM

Other differences:

  1. Attribute and Property names are not always similar
  2. Changing Attribute/Property values doesn't always get reflected to the other
  3. Attribute is case sensitive , Property is not
  4. Attribute values are always strings , Property can be of different data types

Here is an explanation with examples:
Attribute vs Property

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.