If it is horizontal: write it at the end of the text, align it to the right, and leave a space between the class and the name.
If it is vertical: it is written on the left side of the work, slightly lower than the text and shorter than the content of the text. Write the class name first, then the name.