Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "Andy Dingley" <ding...@codesmiths.com>
Date: 28 Dec 2006 06:31:58 -0800
Local: Thurs 28 Dec 2006 14:31
Subject: Re: Transform a Span into a Div
shapper wrote: http://www.w3.org/TR/html4/sgml/dtd.html > Where can I find some information on nesting rules? Not the easiest thing to learn to read though! (search for "DTD > Can I include a <div> inside a <span>? No. Here's a small snippet of the DTD <!-- %inline; character level elements and text strings <!-- %inline; covers inline or "text-level" elements --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | So we see from this that <span> is one member of %inline; and also of <!ENTITY % block <!ENTITY % flow "%block; | %inline;"> We see here that <div> is one member of %block; and thus of %flow; but <!ELEMENT SPAN - - (%inline;)* > <!ELEMENT DIV - - (%flow;)* > <span> can contain anything from %inline; So <div> can contain <span>, but <span> can't contain <div> Now see if you can read the DTD yourself and see where <p> fits into You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||