Many authors face this issue and often wonder when to use the space, before or after the slash. This mainly depends on the content of the text. If the sentence is showing alternatives between two words, it is advisable to not use any space before or after the slash.
The use of spaces before and after slashes to denote alternatives between multi-word expressions, phrases, or compounds makes the text simpler to read and understand.
When separating lines of plays, poems, or songs, using the space after the slash is also acceptable. Also, a line break must follow the slash.
Example:
After removing the dish from the oven, mix cocoa butter and/or regular butter into it.
World War II / Second World War
Humpty Dumpty sat on a wall, / Humpty Dumpty had a great fall (from the nursery rhyme Humpty Dumpty)