-1

I want to display a division which contains some elements in it in between some text. so i thought to use div inside the para tag in html. but i can't get the thing worked. is there any appropriate way to do this?

1 Answers1

1

No, the <p> tag is only permitted to use "phrasing content" as specified by W3C here under "Permitted contents": http://www.w3.org/TR/html-markup/p.html

Phrasing contents are things like <a>, <em>, <strong>, etc. and don't include <div> as specified here under "Phrasing elements": http://www.w3.org/TR/html-markup/common-models.html#common.elem.phrasing

And normal character data specified here: http://www.w3.org/TR/html-markup/syntax.html#normal-character-data

If you want elements in between your text just break it up into two separate <p> tags, put whatever between it, and style them with CSS to make them look how you want.

Sam
  • 1,115
  • 1
  • 8
  • 23