can we have content text directly in <div>text content</div>
or it should be like <div><p>text content</p></div>
? according to web standards.
views:
45answers:
3
+1
A:
You can have character data directly inside a div element. If (and only if) that character data is a paragraph, then it should also be marked up as a paragraph (as per your second example). If you only have one paragraph of content inside the div, then you should usually avoid having the div element as it serves no purpose.
David Dorward
2009-11-02 10:12:19
thanks for answer. What W3c says regarding this?
metal-gear-solid
2009-12-13 09:14:55