I want the user to enter numbers with a unit such as "cm", "kg" or "$". This can be done in jQuery UI: Example
However, I would like to implement it in pure html, such as:
input{
display: inline;
}
div.euro-sign::after{
content: "€";
margin-left: -40px;
}
<div><input placeholder="5 €" type="number" step="1"></div>
<div><input placeholder="5 €" type="number" step="1" unit="€"></div><!-- NOT working -->
<div class="euro-sign"><input placeholder="5" type="number" step="1"></div><!-- Workaround -->
Is there a more native way for doing it (like example 2) or do I have to implement the workaround (example 3)?