Forum Moderators: open

Message Too Old, No Replies

Validating - xhtml strict

         

adammc

3:50 am on Jun 8, 2007 (gmt 0)

10+ Year Member



Hi folks,

Can anyone possibly help me with this?
Im trying to valid my page and am left with 2 errrors:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

"document type does not allow element "h2" here"?
<div id="main">
<h2>somem text</h2>

"document type does not allow element "blockquote" here; missing one of "object", "ins", "del", "map", "button" start-tag."
<p><blockquote>

Any help would be greatly appreciated :)

adammc

4:32 am on Jun 8, 2007 (gmt 0)

10+ Year Member



i got the blockquote error fixed by removing the <p> tags surrounding it.

Still trying to work out the H2 error

adammc

4:35 am on Jun 8, 2007 (gmt 0)

10+ Year Member



same thing, all fixed!
I removed the <p> tags surrounding the <h2> tags

Robin_reala

6:25 am on Jun 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<p>
s can only contain inline elements - they're very much bottom of the line in the HTML pecking order.

adammc

6:55 am on Jun 8, 2007 (gmt 0)

10+ Year Member



Hi robin...
Thanks for the reply :)

Can you possibly explain the definition of 'inline elements'?

Robin_reala

8:49 am on Jun 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, sorry :) An basic definition of an inline element is an element that can break across multiple lines. A <span> is a generic inline element; other examples are <strong>, <em>, <q>, etc etc.

Marshall

8:51 am on Jun 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



"Inline elements typically may only contain text and other inline elements. When rendered visually, inline elements do not usually begin on a new line."

adammc

9:19 am on Jun 8, 2007 (gmt 0)

10+ Year Member



thank you both :)

g1smd

7:55 pm on Jun 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you remember to make your pages from headings, paragraphs, lists, (tables), and forms you'll not run into this problem again.

If each piece of content is enclosed in one of those block-level elements you'll find the page easier to style with CSS too.