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

Re: HTML syntax errors



On Thu, Jan 03, 2002 at 05:24:58PM -0500, James A. Treacy wrote:
> On Thu, Jan 03, 2002 at 09:22:37PM +0000, Jaime E. Villate wrote:
> > On Thu, Jan 03, 2002 at 03:44:31PM -0500, James A. Treacy wrote:
> > > In partners/index.en.html, the author wants to use a <p> in a list. Just
> > > change them to <br>? You really should be able to have paragraphs in a
> > > list.
> > You can have paragraphs inside listitems; in fact, I usually do the following:
> > 
> Take a look at partners/index.en.html . What is wrong with the <p> at
> line 129?

Ah, that's another fairly common mistake found in HTML pages:
You can only change the type of font inside ONE paragraph. Tags such as
<font>, <strong>, <i>, <small>, etc cannot extend beyond the frontier of a
paragraph. You should replace:
   <small>some text
   <p>more text</small>
by:
   <small>some text</small>
   <p><small>more text</small>

which is now valid HTML, but not XHTML. If you want valid XHTML, use:
   <p><small>some text</small></p>
   <p><small>more text</small></p>

In the case of partners/index.en.html, the same mistake appears in several
places. A quick way of fixing it is: s/<p>/<\/small><p><small>/
but only in lines 129-249. 

Cheers,
Jaime



Reply to: