3 Replies - 1039 Views - Last Post: 24 November 2007 - 09:03 PM

#1 richiebaby  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-November 07

Why won't it recognise my background tag? Code included

Post icon  Posted 23 November 2007 - 11:19 AM

Previously i was validating my code through xhtml 1.0 and the one major problem was that it tells me the background tag does not exist.

So i changed my doctype to html 4.1 to hopefully get round the problem but to no avail.
If it's deprecated what are you supposed to use instead?
Or what if any are the alternatives



The code as is below

<table width="1230" background="ma pics/12.jpg" border="1" cellspacing="0" cellpadding="0">





The jpg is in a css file on my pc and displays it in my browser when i see the page although unpublished.
I havn't tried to publish this page yet but every time i try it through w3schools validator it tells me the tag dosen't exist?!
I've included the whole code to see if that will help at all. Cheers






The code below as requested

<table width="1230" background="ma pics/12.jpg" border="1" cellspacing="0" cellpadding="0">

The jpg is in a css file on my pc and displays it in my browser when i see the page although unpublished.
I havn't tried to publish this page yet but every time i try it through w3schools validator it tells me the tag dosen't exist?!

I've included the whole code to see if that will help at all. Cheers

One more thing do you think it would make any difference if I took the jpg out of the css and made the link straight each page could that help? Just an idea.




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>
<link rel="stylesheet" type="text/css"
href="mariearts.css" />
<title>Marie arts</title>
<meta name="Keywords" content="Drama, School, Leeds, Marie Arts, Performance, Nina Prescott, Gabrielle Cresswell, Performance, Self-expression, Children, Drama Lessons, Role-play, Mime work, voice expansion, trust exercises, Workshops" />
<meta name="Description" content="Drama school for children, Artistic creativity, Teaching various skills such as, Role-play, Mime work, voice expansion, trust exercises,Workshops " />
</head>
<body>




<table width="1230" background="ma pics/12.jpg" border="1" cellspacing="0" cellpadding="0">




<tr>
<td>
<h1>Marie Arts</h1></td>
</tr>
</table>
<h4 align="center">
<a href="2mariearts.htm" style="text-decoration:none">please
<img border="0" src="ma pics/cm4.jpg" align="middle" width="165" height="150" alt="mask"></img>
enter 
</a>
</h4>
<h5>Drama and performance school</h5>
<hr />
</body>
</html>








<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head>

<link rel="stylesheet" type="text/css"
href="mariearts.css" />
<title>Marie arts</title>

<meta name="Keywords" content="Drama, School, Leeds, Marie Arts, Performance, Nina Prescott, Gabrielle Cresswell, Performance, Self-expression, Children, Drama Lessons, Role-play, Mime work, voice expansion, trust exercises, Workshops" />
<meta name="Description" content="Drama school for children, Artistic creativity, Teaching various skills such as, Role-play, Mime work, voice expansion, trust exercises,Workshops " />

</head>
<body>


<table width="1230" background="ma pics/12.jpg" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
<h1>Marie Arts</h1></td>
</tr>
</table>

<h4 align="center">

<a href="2mariearts.htm" style="text-decoration:none">please
<img border="0" src="ma pics/cm4.jpg" align="middle" width="165" height="150" alt="mask"></img>
enter 
</a>
</h4>
<pre>

</pre>
<h5>Drama and performance school</h5>
<hr />
</body>
</html>


Is This A Good Question/Topic? 0
  • +

Replies To: Why won't it recognise my background tag? Code included

#2 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 64
  • View blog
  • Posts: 3,505
  • Joined: 31-March 03

Re: Why won't it recognise my background tag? Code included

Posted 23 November 2007 - 01:10 PM

Moved to HTML & CSS.

You'll need to use CSS or inline styles to get the background set.

/*CSS variant*/
table.someClassName {
   background-image: url(path/to/image.ext);
}

<!-- HTML inline variant -->
<table style="background-image: url(path/to/image.ext);">


Was This Post Helpful? 0
  • +
  • -

#3 CrazySain  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 97
  • Joined: 30-August 07

Re: Why won't it recognise my background tag? Code included

Posted 24 November 2007 - 08:59 PM

Also, since I'm a person that looks ahead. Don't forget to upload the pic and change all the links to that picture to its new home. I've forgot to do that a million times its just a pain. So a little heads up
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1619
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Why won't it recognise my background tag? Code included

Posted 24 November 2007 - 09:03 PM

@richiebaby: this question has been answered for you over and over again. When are you going to stop asking and start trying the solutions? :P
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1