-
- CommentAuthorlostwarrior
- CommentTimeJul 11th 2008 edited by lostwarrior on the 11th July 2008 at 02:08:00 EDT
hi to every one
putting h1,h2,h3 in a paragraph tag is a right format or not???
<p><h1>adasdas</h1></p>
<p><h2>adasdas</h2></p>
<p><h3>adasdas</h3></p> -
- CommentAuthortristian
- CommentTimeJul 11th 2008
It would be better if you put it outside the paragraph so that any style connected to the paragraph wont effect the heading tag. Putting a header inside a paragraph might break XHTML rules. -
- CommentAuthorwfiedler
- CommentTimeJul 11th 2008 edited by wfiedler on the 11th July 2008 at 04:17:22 EDT
putting h1,h2,h3 in a paragraph tag is a right format or not???
No! Block level elements like h1, h2 etc. are not allowed in paragraph tags. It doesn't validate. Place the headings before the paragraph tags. -
- CommentAuthorpapab30
- CommentTimeJul 11th 2008
A paragraph tag is also a block level element.
Example usage:
<h1>title</h1>
<p>Some random example text to display.</p>
<h3>Header of something</h3>
<p>Some more random text to be used as an example.</p>
You should not layer a header tag inside a paragraph tag, or vice versa. Both are seperate elements and should be treated as such. If you need to add something between one of those types of tags, use an inline element such as a span tag which will not break the flow of the document. -
- CommentAuthorwfiedler
- CommentTimeJul 11th 2008
A paragraph tag is also a block level element.
Exactly papab30. You described what I meant
1 to 5 of 5
