I would suggest running that through a validator, as there are quite a few problems with that, the biggest of which is wrapping a bunch of block level element with a paragraph. Here is a good validator: http://validator.w3.org/check
I have total-validator installed as a plugin in firefox. I validated with that and changed the HTML. instead of pre tag, I used “white-space: pre” as a style for para and it looked good. Thank for the tip @joshuanhibbert.
I have a question:
when i give a new line after the para tag, the browser adds small amount of horizontal space after the text (may be couple of pixels):
But when I give this way:
There is no space after the text. Does HTML code spacing(new line) also has effect on how the HTML will look in the browsers?