Closing a tag

Why do I sometimes have to end a tag with a dash and at other times I can leave them out?

please read this post, it should answer your question. <p1> are by the way not existing, it is just <p>

Alright, thank you very much. That helped a lot.