To paste code in these forums you need to wrap it in triple back ticks. Put three back ticks on a line of their own, then underneath that paste your code, then underneath your code on a separate line put three more back ticks. The back tick key on my keyboard is in the upper left above the Tab key and below Esc.
It’s tough to tell without being able to see your entire HTML. Make sure you don’t have an extra opening or closing p tab around. This is just a guess because as @udaaff said, the code we can see in the screen shot looks good.