What I want is that the inputs that are on the right side are not some more to the left or to the right than others. I don't care if you need to use css or if it's just a div tag.
<div name="dinero">
<div name="monedas">
<label>Monedas de 1 cent: </label>
<input id="1" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 2 cents: </label>
<input id="2" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 5 cents: </label>
<input id="5" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 10 cents: </label>
<input id="10" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 20 cents: </label>
<input id="20" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 50 cents: </label>
<input id="50" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 1 euro: </label>
<input id="100" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 2 euros: </label>
<input id="200" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Monedas de 30 euros: </label>
<input id="3000" type="number" min="0" value="0" onchange="sumar()">
<br>
</div>
<div id="billetes">
<br>
<label>Billetes de 5 euros: </label>
<input id="500" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Billetes de 10 euros: </label>
<input id="1000" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Billetes de 20 euros: </label>
<input id="2000" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Billetes de 50 euros: </label>
<input id="5000" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Billetes de 100 euros: </label>
<input id="10000" type="number" min="0" value="0" onchange="sumar()">
<br>
<br>
<label>Billetes de 200 euros: </label>
<input id="20000" type="number" min="0" value="0" onchange="sumar()">
<br>
</div>
</div>
The accepted answer is bad practice and a lousy application of HTML tables, and should not be applied in any context. Here the support:
HTML tables exist to tabulate information, not to give style, by trying to "give style" or generate the structure with tables, all the semantics of the site are being damaged, future improvements are complicated, it will not work well on all devices and last and perhaps most importantly, accessibility (people with disabilities) is being affected. This is not new, it has been a bad practice for several years now, since the last decade.
My answer/solution:
As for whether you should use CSS or not, the answer is: Yes, you should use CSS , HTML doesn't offer styles, and in the background when you don't use styles, it results them by assigning the browser (default styles).
Given that you say you don't want to use any framework, the easiest thing to do might be to make
<label>
it an elementinline-block
and give it a fixed width. The only "problem" would be the responsiveness, for which you would have to apply media queries.This is one of the possible solutions I mentioned with the html table tag