In the HTML markup, you can write & ndash or & mdash.
But if I, for example, output some text to input with js, then the mnemonic does not work and is perceived simply as a set of characters:
$('button').click(function() { $('input').val('Москва - столица России'); }); How to make a long dash in such a text, outputted with the help of js?