S
S
sorry_i_noob2018-03-07 16:46:23
HTML
sorry_i_noob, 2018-03-07 16:46:23

I saw the rel attribute in someone else's code, which stores the value for working with JS. On caniuse rel is poorly supported by browsers. Is this a normal code?

Is it ok to use rel in this way? Is it poorly supported by browsers only in the form for which it was intended? But just like ... an attribute for storing any values ​​- no?
Is this bad code? After all, there are data-* attributes. Or am I not understanding something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2018-03-07
@karminski

In Javascript, you can work with any attributes, be it data or rel or anything else. It's just customary to work with data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question