Yes you can, but using ONLY will be an invalid attribute, so use hidden
data-hidden="hidden"
as it's valid to create custom attributes as of HTML5, but they should've data-
prefix.
And then in your CSS, you can write..
[data-hidden="hidden"] {
display: none; /* OR */
visibility: hidden; /* If you want to reserve space */
}
If you are damn sure that you will be using this to hide elements, and ONLY hide, than consider using !important
so that specificity doesn't trouble you.