Andrea
Andrea

Reputation: 13

Can html attributes (other than class) have more than one value assigned to them?

Apart from the class attribute that can have many values, I'm wondering if there are other attributes in html where I could do the same, add multiple attributes separated by spaces?

If so, could you leave a link to where you got that info from?

I read w3 specifications but I couldn't find an answer for this particular question.

Thanks in advance

Upvotes: 1

Views: 70

Answers (1)

mmh4all
mmh4all

Reputation: 1743

you can create your custom attributes, they should start with data- here is an example

<div data-myCustomAttribute="abc def 123 orWhatEverYouWant"></div>

Upvotes: 1

Related Questions