Question: are attributes and property the same in javascript?
Answer: They are very similar to properties, but not quite as good. When a property is available it's recommended that you work with properties rather than attributes. An attribute is only ever a string, no other type. If an element has a default value, the attribute shows the default value even if the value has changed.