yes it is
In informal writing, an exclamation mark is rather used for emphasis, an interrupting imperative, etc. Using typographical features, such as bold, underline, or italics, is another l technique in grammar. but you can use it to for formal but the exclamation mark should only be used if the preceding statement is one of surprise or some other form of interjection as in the phrase.