New course! Every coder should learn Generative AI!
Try a free lesson0
How do i put another id to audio button?( Like it will function 2 elements in 1 button)
Html
3 Answers
+ 3
Your question is not clear
+ 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.
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>