TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Re: Best way to indent in HTML From:"Jeanne A. E. DeVoto" <jaed -at- JAEDWORKS -dot- COM> Date:Thu, 28 Jan 1999 21:57:32 -0800
At 3:44 PM -0800 1/28/99, Scott Miller wrote:
><H1>Heading</H1>
><BLOCKQUOTE>
><P>Text
></BLOCKQUOTE>
><H1>Heading</H1>
>
>or
>
><H1>Heading</H1>
><UL>
><P>Text
></UL>
><H1>Heading</H1>
>
>Which is best? Any dangers to either method?
Wellll...
The basic problem with invalid or weird HTML is that you never know what's
gonna happen. The most popular current browsers render <blockquote> by
indenting the contents on all four sides; but there's no law says that
browsers will continue handling <blockquote> that way for all time. If some
browser comes out tomorrow that renders block quotes in italics, or small
lettering, or purple, you're at least mildly screwed. Likewise if someone's
using a personal style sheet or individual prefs to render <blockquote>
some other way that they find more suitable.
The second method is even worse because in addition to being weird HTML,
it's invalid (an unordered list can only contain list items, <li>, and
can't legally contain bare paragraphs). Most browsers try to be forgiving
of invalid HTML (as well they should), but a browser would be wholly within
its rights to decide, for example, when it sees the <p>, that you must have
forgotten to close the <ul>, and helpfully close it for you...which would
lose you your indentation.
The heavens probably will not fall if you use either method, but either one
is problematic.
If it's not absolutely essential that the text outside headings be
indented, I'd consider using style sheets. They're not supported 100%, of
course, but this sounds like it may be a case where the formatting is
desirable but not necessary for comprehension.
Someone else mentioned using a one-cell table for the text:
<h1>Heading</h1>
<table width="100%" cellPadding=15><tr><td>
<p>Text</p>
</td></tr></table>
<h1>Heading</h1>
This will probably work, but be warned that browsers tend to treat width
specifications as suggestions and the paragraphs under different headings
might not line up precisely with each other, depending on window width,
font size, etc.
--
jeanne a. e. devoto ~ jaed -at- jaedworks -dot- com http://www.jaedworks.com
Morning people may be respected, but night people are feared.