|
Posted by Andy Dingley on 09/24/07 10:29
On 23 Sep, 16:20, "Joe Butler" <ffffh.no.s...@hotmail-spammers-
paradise.com> wrote:
> I have a basic, Title, series of paragraphs, Title, Series of paragraphs,
> etc. etc. structure to a page.
Find some _good_ tutorials and study the following topics:
* HTML nesting rules for "block" and "inline" elements (you can put a
<ul> inside a <div>, but not inside a <p>)
This is all specified by the HTML specs and DTD, but the W3C original
documents aren't an approachable read for starters.
* HTML parser error recovery behaviour if you break these rules. You
can't put a <ul> inside a <p>, so "<p><ul>" will be parsed as "<p></
p><ul>" rather than the "<p><ul></p>" you might have expected.
* The correct use of <br>, as a purely inline element. It's for
putting linebreaks _inside_ a paragraph (typesetting poetry) not for
indicating the breaks _between_ paragraphs (the <p> does that itself).
As you can't "break something that's already broken", then "<br><br>"
is nonsensical and shouldn't be used. Although it probably does have
an effect you like (once, on one browser) it's not predictable as to
how other browsers might correctly render it. It's quite rare to need
to use <br> at all (correctly!).
* The use of CSS margins, and the "collapsing" behaviour of vertical
margins. If you want to control the spacing between paragraphs, then
use simple HTML markup for one paragraph, then use CSS to adapt the
rendering as needed. http://brainjar.com/css/positioning/ is a good
read.
[Back to original message]
|