+ 1

Do you know?

-inside html - <p hmm="hmm">learning html and css</p> - inside stylesheet - P[hmm] { /* styling "/ } It's works! Even though it's not official attribute so what is use of it?

11th May 2021, 3:31 PM
Gautam Yadav
Gautam Yadav - avatar
5 Respostas
+ 3
that's not strictly valid... however, html is a very permissve language, so even if it's not valid, in most browsers it will work, but you cannot be sure it will be working in all browsers and in future ;P if you want to safely use valid custom attributes, you must rely on 'data-' syntax (using 'dataset' through js to access them): there will be guaranted to work on all browsers at any time, and staying valid html source ^^
11th May 2021, 7:57 PM
visph
visph - avatar
+ 2
There are many plugins that you can use it as attribute inside html tag so html give you an option to write anything inside it's tag, but hmm="hmm" means nothing
11th May 2021, 4:35 PM
Jamal Saied
Jamal Saied - avatar
0
Jamal have you ever used custom attribute? I m not talking about "data-" But any custom attribute? For may be... JavaScript purpose? If yes! Is it valid? And all Browsers support it?
11th May 2021, 4:43 PM
Gautam Yadav
Gautam Yadav - avatar
0
Pls can u help me with html code to create download space
12th May 2021, 7:32 AM
Miracle Moses
Miracle Moses - avatar