Re: Background problem

On 10 May 2004, at 03:39, SEAN MCDERMOTT wrote:

> Coding from W3schools

Oh dear

> <table border="1"  background="/images/bgdesert.jpg">
> <td   background="/images/bgdesert.jpg">  Second</td>
>
>  1.       Line 16, column 15: there is no attribute "background"
>
> <td background="FRNTPAGES8CP.jpg" >
>
> The schools code and mine appear identical

So? w3schools are:

(a) Not, IMO, very good
(b) Not affiliated with the W3C

There is no background attribute for the table data cell element: 
http://www.w3.org/TR/html4/index/elements.html

Use CSS for presentational detail such as background images.

> Below are the results of attempting to parse this document with an 
> SGML parser.
>  1.       Line 7, column 6: end tag for "head" which is not finished
> </head>

The <title> is required.

> I have used the same "DOCTYPE and  <meta http-equiv=" as w3cschools 
> uses.

The meta http-equiv that says an XHTML document has content type of 
text/html? Oh dear.

<meta http-equiv> is suboptimal anyway: 
http://www.htmlhelp.com/tools/validator/charset.html

I wouldn't suggest you learn XHTML until you have a good grasp of HTML. 
XHTML has a few nasty gotchas. http://www.hixie.ch/advocacy/xhtml

> I am bewildered as to why I get an error.

The validator checks a document against a DTD.
Your document uses non-standard stuff which doesn't appear in the DTD 
you selected.
Therefore, you get an error.


--
David Dorward
      <http://dorward.me.uk/>
<http://blog.dorward.me.uk/>

Received on Monday, 10 May 2004 04:11:15 UTC