Typesetting of English words in css form

I would like to ask how to write vertical typesetting like the Degree Course in the picture from bottom to top, because you still need to merge 9 rows of cells. After setting it to display:block, the merged cells will be invalid. If you rotate with transform, the width of the element will be very wide. How to solve this? thank you

.
Css
Dec.13,2021

each letter is put in a div and transform is rotated

Menu