Is it "okay" to create your own tags?

Let’s say I decide to make my own html tags, such as “<code>” or “<comment>”.

Yes, I COULD create a regular span tag and set it’s style to whatever I custom name I want it to be.

However, I’m wondering if creating your own custom tags (and specifying how those tags style in the CSS) will break the page or prevent it from being rendered by the browser, both older browsers and new ones.