Even very literate people, if they are far from printing, often confuse a dash with a hyphen. Meanwhile, these are completely different punctuation marks, and their scope of application is also different. You can type a dash on the keyboard in different ways.
Instructions
Step 1
Understand the main rule of using hyphens and dashes, which, unfortunately, is not found in many textbooks. The hyphen is always written without spaces either before or after it. For example: "ampere-turn". If a hyphen is used as a dash, it is separated by spaces on both sides. For example: "A keyboard is a device for entering text into a computer." If a specialized character specially designed for this is used as a dash, then it is not separated by spaces on either side, similar to a hyphen. For example: "Before you are the paintings of the Arbat artists."
Step 2
If you compose a document using a single-byte encoding, or are not sure that it will not be translated into such encoding in the future, use the minus sign available in the normal ASCII code as both a hyphen and a dash. When using it as a hyphen, do not put spaces, and when using it as a dash, put on both sides.
Step 3
If the customer requires the text, compiled in one-byte encoding, use as a dash two consecutive minuses, which are separated by spaces on both sides: "The best is the enemy of the good."
Step 4
When typing in double-byte encoding, use a real dash, which, as mentioned above, does not need to be separated by spaces. To type it in Windows, press the "Alt" key, then, without releasing it, dial the number 0151.
Step 5
If you do not have Windows, select the appropriate character in the table that appears in the OpenOffice.org Writer editor when you select Insert - Special Character from the menu. If necessary, copy it through the clipboard to another program, provided that it also uses double-byte encoding.
Step 6
Another way to type a dash when using a double-byte encoding is to copy it from the Wikipedia article, which is called "Dash". If you are too lazy to open another tab in your browser, copy the dash from the first paragraph of this article.
Step 7
Finally, in your HTML code to type dashes, use a combination of "&", the word "ndash" or "mdash", and a semicolon (without quotes everywhere). If you use the word "ndash", the dash will be the same length as the Latin letter "N", and if "mdash" it will be the same length as the Latin letter "M".