homepage Welcome to WebmasterWorld Guest from 174.129.80.166
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

This 33 message thread spans 2 pages: < < 33 ( 1 [2]     
Validation Problems
Simon




msg:4312341
 10:08 am on May 14, 2011 (gmt 0)

Hi,

Just wondering if anyone can help, I'm stuck on an assignment. I have created a website and when I validate I'm still getting 2 errors, which from Googling seem quite common. I've tried a few different things but the errors are still there.

The webpage has to be created solely in HTML and the webpage has to be created as a table...25% nav bar and 75% rest of webpage. The webpage is working fine, it just won't validate.

Here are the errors:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>

<title>Produce</title>

<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

<meta name="description" content="Joe's fruit and vegetables online">

<meta name="keywords" content="Joe's, fruit, vegetable, online">

</head>

<body bgcolor="#99FF99">
<font face="Verdana, Arial, Helvetica, Sans">
<font color="#66FF00">
<H1 align="center">All produce at Joe's</H1>
</font>
<br>
<br>
<table border="0" width="100%">
<tr>
<td valign="top" width="25%">
<a href="index.htm"target="_blank"><IMG SRC="carrothome.JPG"alt="Home"height="100" width="100"> </a>
<br>
<br>
<br>
<a href="produce.htm"target="_blank"><IMG SRC="carrotproduce.JPG"alt="Produce"height="100" width="100"> </a>
<br>
<br>
<br>
<a href="history.htm"target="_blank"><IMG SRC="carrothistory.JPG"alt="History"height="100" width="100"></a>
<br>
<br>
<br>
</td>
<td valign="top" width="75%">
<h4 align="center">Benefits of shopping at Joe's online:</h4>
<ul>
<li>It's convenient because the website is available 24 hours per day</li>
<li>You don't have to leave home to have the best produce available</li>
<li>Your phone call to order produce is free</li>
</ul>
<br>
<hr>
<br>
<center>
<table border="2">
<tr>
<th>Item</th>
<th>Price</th>
</tr>
<tr>
<td>Alfalfa sprouts</td>
<td>$1.50 per punnet
</td>
</tr>
<tr>
<td>Apples, Bonza</td>
<td>$5.99 per kg </td>
</tr>
<tr>
<td>Apples Golden Delicious</td>
<td>$4.99 per kg</td>
</tr>
<tr>
<td>Artichoke hearts, pickled</td>
<td>$17.99 per kg</td>
</tr>
<tr>
<td>Avocados, dark, large</td>
<td>2 for $3.50</td>
</tr>
</table>
<br/>
<a href="mailto:info@joes.com.au?subject=More Information">info@joes.com.au</a>
<br/>
<br/>
<img src="map1.JPG" width="500" height="90" alt="imagemap" usemap="#map1">
<map name="map1">
<area shape="rect" coords="20,31,140,53" href="index.htm" target="_blank" alt="Home">
<area shape="rect" coords="178,30,301,52" href="produce.htm" target="_blank" alt="Produce">
<area shape="rect" coords="335,30,456,51" href="history.htm" target="_blank" alt="History">
</map>
</center>
</table>
</font>
</body>
</html>

Validation Output: 2 Errors
Line 19, Column 19: document type does not allow element "H1" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
<H1 align="center">All produce at Joe's</H1>&#9993;
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Line 24, Column 31: document type does not allow element "TABLE" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
<table border="0" width="100%"> &#9993;
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Thanks in advance
Simon

 

g1smd




msg:4316017
 8:44 pm on May 22, 2011 (gmt 0)

I'd be interested to see where your course is going over the next few weeks and months.

Hopefully it shows why the code you were asked to do last week is just so wrong nowadays, and will show the right way.

However, I somehow doubt that is going to happen.

Leosghost




msg:4316029
 9:23 pm on May 22, 2011 (gmt 0)

IMO ( and I doubt if I'm alone in thinking this ) you'll learn way more here at WebmasterWorld , than on any "course" ..plus what you pick up here will actually be relevant to what is being done in this century.

virtualemployeeonlin




msg:4326368
 1:07 pm on Jun 15, 2011 (gmt 0)

Following Error on line 19

<font face="Verdana, Arial, Helvetica, Sans">
<font color="#66FF00">
<H1 align="center">All produce at Joe's</H1>

You include H1 tag within Font tag which is not allowed in any of HTML Doctype.
Thats way validation error occurs as "This might mean that you need a containing element, or possibly that you've forgotten to close a previous element." These font tags cause this error. don't use any inline element within block elements.

This 33 message thread spans 2 pages: < < 33 ( 1 [2]
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved