A Complete Guide to Data Attributes

I use them all the time in Hype since version 4.x has allowed access to them and plead for a dedicated view for them. Here is a great article with two excerpts to get you into the mood to learn about data-attributes …

HTML elements can have attributes on them that are used for anything from accessibility information to stylistic control.

What is discouraged is making up your own attributes, or repurposing existing attributes for unrelated functionality. In the following ex

Read the full article at CSS tricks…


Nice Max - Thank You!

One of the things I like about articles done in this style is there are plenty examples demonstrating their use. Often “informative” posts have just one example that doesn’t accurately convey the topic for beginners.

Imagine learning English with just one example of the usage of a word. For instance…

“Time flies like an arrow”
…would leave the new practitioner clueless when they came across this usage:
“Fruit flies like a banana”.

1 Like

:face_with_raised_eyebrow: Since when do banana’s fly?

Just in case you are serious - hard to tell sometimes… :thinking:

A fruit fly loves to buzz around fruit. :banana:

When they are Exported/imported…:sunglasses:


@JimScott I’m always serious… :crazy_face: but @MarkHunte managed :flushed: to answer to my question.

But I’ll stop derailing this topic. Sorry for that Max! :woozy_face:

Happens to the best of us… no worries. What is life without that bit of extra fun: boring!

Data attributes: Has a hard time grasping jokes :wink: