Can you please break down dashes and hyphens? When do we use an em-dash? When do we use an en-dash? Do we put a space between the words on either side of a hyphen or not? Help!
Hoo boy! This is kind of a big topic, so I’m going to try to give you a handy-dandy cheat sheet rather than a detailed breakdown everything you could ever want to know.
Hyphen (-): This is the littlest dash, and it’s used to join words with other words. This usually happens when two words preceding a noun are combining to modify it (this is called a compound modifier), like first-class cabin, or when several words go together to make up one noun, like johnny-come-lately. Hyphens show that several words form a single unit and help you read them together, as you were meant to. The example everyone loves to give is that a high school student might be either a stoner or a secondary schooler, but a high-school student can only be a pupil at a high school. That is, you can’t be sure whether high is modifying only school or the whole phrase school student, or even just student, the same way big and red function separately in the big red dog. You don’t need a hyphen in a compound modifier when one of the words is an adverb ending in -ly, like in the swiftly flowing river, because adverbs cannot modify nouns, only adjectives, verbs, and other adverbs, so we already know that swiftly and flowing go together—that’s the only combination that’s allowed, grammatically—so there’s no confusion and no need for a hyphen. When a compound modifier appears after the noun it modifies and a version the verb to be, the hyphen often sticks around to help prevent confusion, so the little-known play and the play is little-known. NEVER put spaces around a hyphen.
En dash (–): En dashes are slightly wider than hyphens—the width of a lowercase n, or at least that’s the idea. Their main function is to join whole phrases to other words or phrases, as in World War II–era planes or post–Johnson administration policies. The en dash means that you’re talking about policies that followed the Johnson administration, not administration policies after Johnson. The en dash doesn’t always look much different from the hyphen, so I think this distinction is lost on many readers. Some style guides, like the AP Stylebook, which is used by many newspapers, don’t use en dashes at all. Instead, these publications often put hyphens between every word in the phrase. AP would have you write World War II-era planes, because it wouldn’t stick hyphens in the middle of a proper noun, and post-Johnson-administration policies. The other time you tend to see the en dash is setting off attributions of quotes, like I did with your name up above. The en dash also never takes spaces around it.
Em dash (—): The em dash is the longest of the three and, as you may have guessed, is meant to be the width of a lowercase m. It is used to set off parentheticals—asides in the middle of the sentence, like this one—or to mark a dramatic pause at the end of a sentence, like so: “First things first: to the death.” “No—to the pain.” There are no real rules about what kind of asides should be set off with em dashes versus what should be set off with commas or parentheses, so different writers and editors will use dramatically different quantities of em dashes. Just know that there should not be more than one set of them per sentence (it becomes impossible to tell what is aside and what it the main body of the sentence), and that using a lot of them makes your writing sound somewhat staccato. As for whether to put spaces around them, here you actually have a choice. Some style guides say yes, others say no. I don’t use them, obviously, but there’s no real reason for that other than I think the spaces make sentences look… well, kind of spacey. In your own writing, all that matters is that you pick one style and stick to it.