P.S. A little note on rules:

I honestly don't know ANYONE (including myself) who is really good at these rules because they studied them. Studying the rules is a second-choice method and nearly always leaves you making occasional errors, because of the exceptions pointed out by others above.

The people who can really edit books do so because their brains naturally absorb the text they see, spelling, grammar and content, and somehow sort it out for themselves. They build the rules in their own heads.
Then they learn a few rules in school which help them correct or simplify some rules they got wrong.

Then they practice editing and see some rules they didn't know and learn them as they go. And then they're good.

So when I send you the rules, I realize it's no fun trying to learn them. But looking like you know them tells the publisher that they can count on you.

But really there are thousands, and you won't learn them all as a bunch of rules and exceptions. I'm pointing out a small subset of five that, if you take the trouble, can make a publisher or editor less likely to throw you out on your ear. Or if you send your MS to me, will make me more likely to want to edit what remains.