Hello,
Can I have <h1>, <p> and <span> tags inside a <p> tag?
What should be the best tag to encapsulate all other tags? <div>?
What are the limitations of using <p> and <span> in this?
Where can I find some information on this?
Thanks,
Miguel
Els - 30 Mar 2007 17:05 GMT
> Can I have <h1>, <p> and <span> tags inside a <p> tag?
<span>: yes. <h1> and <p>: no.
> What should be the best tag to encapsulate all other tags? <div>?
Depends why you want to do that. <body> is really all you need, but if
you need more divisions, than <div> is good, yes.
> What are the limitations of using <p> and <span> in this?
<p> is the element you use for a paragraph, and <span> is what you use
if you want to apply some style rules for no particular important
reason to a portion of text inside a paragraph. If you'd want to make
some text bold, think about the reason - do you want to emphasize it?
Use <em>.
> Where can I find some information on this?
http://www.w3.org/MarkUp/Guide/

Signature
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Andy Dingley - 30 Mar 2007 18:00 GMT
> Can I have <h1>, <p> and <span> tags inside a <p> tag?
No. You can have <span> in there, but not the others. You could put
all three inside a <div>
> What should be the best tag to encapsulate all other tags? <div>?
Yes, but I start to get worried making recommendations like this
blindly, without seeing what you're trying to achieve!
> What are the limitations of using <p> and <span> in this?
>
> Where can I find some information on this?
It's not easy to find information on this. Most authoring guides
ignore it, or get it wrong.
It's often discussed in here though - search for "block" and "inline"
The definition is from the HTML DTD (which is hard to read at first)
http://www.w3.org/TR/REC-html40/sgml/dtd.html
Some explanation has been posted in the past
http://groups.google.co.uk/group/comp.infosystems.www.authoring.stylesheets/msg/
65d232d58d400ff1
http://groups.google.co.uk/group/alt.html/msg/7fa65f912f6e8458