I know it all depends on the publisher
Actually, no. My teacher at university told me scripts are extremely standardized, not just in style, but also content (first time a character appears his name is supposed to be in all-caps, significant sound effects are to be written in all-caps and a lot of other instances of all-caps).
I would suggest either getting a book on the subject or reading a lot of scripts online. I'm sure you can also find a lot of guides online too, but make sure they're reputable. That is, make sure it's written by a proper scriptwriter and not some indie wannabe who wants to defy the system (you gotta know it before you can buck it).
I would also suggest using Celtx.
It's a free software (but you can pay for features you don't need) that handles much of the actual formatting for you. It may seem a bit restricting at first, but those restrictions are due to industry standards, not the program. It's also very broad. There are setups for several different mediums beyond just film/TV. I haven't tried anything other than film, but whatever you're writing for, it's probably there.