I second that - good advice writermom! I would also stress that you need to get the editor's attention right away and let them know how the topic is relevant to their audience right away. As a former publisher/editor, I've been on the receiving end of some very bad query letters. The worst ones were the letters that left me going, "What does this have to do with my audience?"
And ditto on the building a relationship with editors. If there is a magazine you hope to write for regularly, try emailing the editor before submitting a query. Tell them why you like the pub (we're suckers for flattery

and that you have some ideas you would like pitch but wondered if there was something specific they were looking for, etc. If the pub doesn't have their editorial guidelines on the website, ask for them. If they are listed, ask for verification on something. Anything to establish a rapport. This is the SALES part of being a writer
Good luck!