How do i put another id to audio button?( Like it will function 2 elements in 1 button) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do i put another id to audio button?( Like it will function 2 elements in 1 button)

Html

27th Mar 2023, 1:38 PM
Zedro
Zedro - avatar
3 Answers
+ 3
Your question is not clear
27th Mar 2023, 2:16 PM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
+ 1
Each html element can have exactly 1 id. Maybe you mean css classes? Or do you want to attach 2 javascript functions to the same html element? Please clarify and link your code.
27th Mar 2023, 1:49 PM
Lisa
Lisa - avatar
0
The ID must be unique and used once on the entire site. For your purpose, it's better to use a class: <button class = "one"></button> <button class = "one"></button>
27th Mar 2023, 2:48 PM
Knight
Knight - avatar