Re: Valid XHTML Question?

by Andrew McFarland <aamcf(at)aamcf.co.uk>

 Date:  Mon, 03 Jun 2002 11:36:13 +0100
 To:  "Hwg-Basics List (E-mail)" <hwg-basics(at)hwg.org>
 In-Reply-To:  umr
  todo: View Thread, Original
At 16:52 02/06/02 -0500, Hall, Richard H. wrote:
>I have been trying to validate a page based on strict XHTML and have got 
>it down to two errors, which are:
<snip/>
>I'm pretty sure the offending stuff is within the following xhtml from my 
>page:
<snip/>
>         <p>
>                 <img src = "images/aram.jpg" class="main_image1" 
> alt="picture from of Aram in Usability Lab" />
>                 <h3>The mission of the Media Research Laboratory is to 
> conduct research related to the design, development, and evaluation
>                 of web-based new-media technologies.</h3>
<snip/>

You have put a <h3> inside a <p>.

In HTML, the <p> would be implicitly closed when you opened the <h3>. In 
XHTML there is no implicit opening or closing of elements (which makes life 
easier in the long run). Change the above code to

>         <p>
>                 <img src = "images/aram.jpg" class="main_image1" 
> alt="picture from of Aram in Usability Lab" /></p>
>                 <h3>The mission of the Media Research Laboratory is to 
> conduct research related to the design, development, and evaluation
>                 of web-based new-media technologies.</h3>

And everything should be fine.

Andrew

--
http://aamcf.co.uk/

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA