A Full Information to Knowledge Attributes


HTML parts can have attributes on them which are used for something from accessibility data to stylistic management.

What’s discouraged is making up your personal attributes, or repurposing present attributes for unrelated performance.

There are a number of causes that is unhealthy. Your HTML turns into invalid, which can not have any precise unfavourable penalties, however robs you of that heat fuzzy legitimate HTML feeling. Probably the most compelling motive is that HTML is a dwelling language and simply because attributes and values that do not do something right now doesn’t suggest they by no means will.

Excellent news although: you may make up your personal attributes. You simply have to prefix them with data-* and then you definately’re free to do what you please!


It may be awfully useful to have the ability to make up your personal HTML attributes and put your personal data inside them. Happily, you may! That is precisely what data attributes are. They’re like this:

  • Leave a Reply