Hi everybody, I've always thought that for a prohibition with modals we should use mustn't, but I've recently seen in some grammar books that can't can also be used. Is this so? Because then I was mistaken... Thankss

We say things like, e.g., "You can't park here!", meaning that parking is prohibited. Is that the sort of case that the books are referring to?

Yes, I know you use it when speaking, but could we use it in a formal language or for example on a notice board?
Teachers: We supply a list of EFL job vacancies
modern pianoYes, I know you use it when speaking, but could we use it in a formal language or for example on a notice board?

Contractions such as "can't" are not used in formal language, so it would have to be "cannot". I can't think that this would be used in a direct formal notice of prohibition. For example, an official "No parking" notice would not read "You cannot park here" (having said that, it would not say "You must not park here" either). However, "cannot" can be used formally in the "not permitted to" meaning, e.g. "By law, a man cannot marry his sister".