G
G
GADARUKU2018-06-23 09:37:12
HTML
GADARUKU, 2018-06-23 09:37:12

What is the best way to name ID in Html?

There is no standard for this, right?
Then which style is more popular?

<input type="text" id="my_input" />

<input type="text" id="myInput" />

<input type="text" id="my-input" />

Also, should I use prefixes? With a 2nd underscore to separate it from the id itself?
For example:
<input type="text" id="inp__my_input" />

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question