Companies, recruiting on line, rarely even request a cover letter. Nowadays, companies find it much less expensive to recruit on line vs. advertising in newspapers. Newspapers ads are outrageously expensive for some companies, which is why so many ads are so tiny and you hardly know what you're applying for. On the internet, they can go into a full job description and company benefits. If you are applying to an ad in a newspaper which requires you to use snail-mail, the old fashioned rules still apply.
Perfection begins with no spelling or grammatical errors and unblemished presentation.
First you need to understand why you are writing a cover letter. That's already assumed.