[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xemacs-20 HTML mode



"Stephen J. Carpenter" <sjc@debian.org> sez:

> On Wed, Jul 08, 1998 at 11:33:50AM -0400, Paul Reavis wrote:
> 
>> For example, when it works the way I want it to, it autoindents like
>> such:
>> 
>> <h1>top header</h1>
>> <p>Some stuff here.
>> 
>> <h2>next header</h2>
>> <ul>
>>     <li>an item.
>>     <li>another item.
>> </ul>
>> 
>> And when it doesn't I get:
>> 
>> <h1>top header</h1>
>> <p>Some stuff here.
>> 
>>     <h2>next header</h2>
>>     <ul>
>>         <li>an item.
>>             <li>another item.
>>>         </ul>
>> 
>> Or similar - basically, it doesn't undent unless there's a closing tag.
>
>Well believe it or not...(IMHO)it is right to do this. the <li> tag NEEDS >to
>be closed! I have been doing HTML for almost 2 years now (on and >off..lately
>off but used to be extremely on) and that is a common mistake I have seen
>with people making pages.
>
>I forget the actual problem but <LI> Item </LI> <LI> Item2</LI>
> is treated differntly then  <LI> Item <LI> Item2
>
>for some things ie <P> you can omit the close tag....for <LI>, <TABLE> 
>etc you really NEED the close tag

Well, I appreciate your advice but please don't teach your grandpa to
chew cheese :-)

There are some tags which require closing - <table> is certainly one, as
are the <hX> tags, <b>, etc. There are some which do not - <p>, <li>,
even parts of table like <td>. All can be inferred from context by human
or machine; even really stinky old browsers from four years ago deal
fine without them (assuming they even supported the tags, certainly not
true for tables etc.).

I keep a copy of the Koala book (O'Reilley's "HTML: The Definitive
Guide") handy, as well as current w3 consortium specs. Both have plenty
of examples of omitted tags; they are recognized as part of the standard
and it is permissive on this point so that hand-coded HTML isn't such a
bear that you have to have a word processor to do it.

Note in my example that even the unclosed <p> causes an extraneous
indent - sticking in a </p> fixes it. Frankly, I'd rather not insert
tons of </p> tags into my documents when the standard doesn't require
it.

-- 

Paul Reavis                                      preavis@partnersoft.com
Design Lead
Partner Software, Inc.                        http://www.partnersoft.com


--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: