Please Help / XHMTL validator ERRORS

  • Burner07
  • Born
  • Born
  • Burner07
  • Posts: 1

Post 3+ Months Ago

Hi I am new and have this code and when I go to validate I am getting 30 errors and I don't even know where to begin.
The code is
Code: [ Select ]
 
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!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">
<head>
<!--
 
 
   Filename:         breakfst.htm
   Supporting files: breakfst.jpg, tan.jpg
-->
<title>Kelsey's Breakfast Menu</title>
</head>
<body background="tan.jpg">
<h5 align="center">
   <img src="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br>
   Click the Breakfast, Lunch, or Dinner menu
 
   <map name="Menu">
   <area shape="rect" coords="20,40,156,77" href="breakfst.htm" alt="Breakfast">
   <area shape="rect" coords="241,40,336,77" href="lunch.htm" alt="Lunch">
   <area shape="rect" coords="464,40,568,77" href="dinner.htm" alt="Dinner">
   </map>
 
</h5>
<h1 align="center"><font color="green">
   Breakfast Menu
</font></h1>
<h5 align="center">
   Served 6:30 a.m. - 11:00 a.m.
</h5>
<hr>
<dl>
   <dt><b><font face="sans-serif" color="green">
       Smoked Trout
   </font></b></dt>
   <dd>Fluffy scrambled eggs with smoked trout, goat cheese and
       scallions served with oven-roasted potatoes and toast. 5.45
   </dd>
 
   <dt><b><font face="sans-serif" color="green">
       French Toast
   </font></b></dt>
   <dd>Three thick slices of French bread dipped in egg batter and
       served crisp and golden brown with syrup. 3.25
   </dd>
 
   <dt><b><font face="sans-serif" color="green">
       Belgian Waffle
   </font></b></dt>
   <dd>Crisp malt Belgian waffle and syrup. 3.95
   </dd>
 
   <dt><b><font face="sans-serif" color="green">
       Breakfast Fruit Plate
   </font></b></dt>
   <dd>Fresh seasonal fruit with yogurt or cottage cheese and Kelsey's famous
       Bran Muffin. 3.95
   </dd>
 
   <dt><b><font face="sans-serif" color="green">
       Huevos Rancheros
   </font></b></dt>
   <dd>Two eggs on a flour tortilla with thick chili sauce, shredded
       Monterey Jack and homemade salsa. 4.95
   </dd>
 
   <dt><b><font face="sans-serif" color="green">
       Eggs
   </font></b></dt>
   <dd>Any style with oven-roasted potatoes and toast. 2.95
   </dd>
 
   <dt><b><font face="sans-serif" color="green">
       Lox and Bagels
   </font></b></dt>
   <dd>Nova lox, cream cheese, onion, cucumber and tomatoes. 5.95
   </dd>
</dl>
 
</body>
</html>
 
 
  1.  
  2. <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4.   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <!--
  8.  
  9.  
  10.    Filename:         breakfst.htm
  11.    Supporting files: breakfst.jpg, tan.jpg
  12. -->
  13. <title>Kelsey's Breakfast Menu</title>
  14. </head>
  15. <body background="tan.jpg">
  16. <h5 align="center">
  17.    <img src="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br>
  18.    Click the Breakfast, Lunch, or Dinner menu
  19.  
  20.    <map name="Menu">
  21.    <area shape="rect" coords="20,40,156,77" href="breakfst.htm" alt="Breakfast">
  22.    <area shape="rect" coords="241,40,336,77" href="lunch.htm" alt="Lunch">
  23.    <area shape="rect" coords="464,40,568,77" href="dinner.htm" alt="Dinner">
  24.    </map>
  25.  
  26. </h5>
  27. <h1 align="center"><font color="green">
  28.    Breakfast Menu
  29. </font></h1>
  30. <h5 align="center">
  31.    Served 6:30 a.m. - 11:00 a.m.
  32. </h5>
  33. <hr>
  34. <dl>
  35.    <dt><b><font face="sans-serif" color="green">
  36.        Smoked Trout
  37.    </font></b></dt>
  38.    <dd>Fluffy scrambled eggs with smoked trout, goat cheese and
  39.        scallions served with oven-roasted potatoes and toast. 5.45
  40.    </dd>
  41.  
  42.    <dt><b><font face="sans-serif" color="green">
  43.        French Toast
  44.    </font></b></dt>
  45.    <dd>Three thick slices of French bread dipped in egg batter and
  46.        served crisp and golden brown with syrup. 3.25
  47.    </dd>
  48.  
  49.    <dt><b><font face="sans-serif" color="green">
  50.        Belgian Waffle
  51.    </font></b></dt>
  52.    <dd>Crisp malt Belgian waffle and syrup. 3.95
  53.    </dd>
  54.  
  55.    <dt><b><font face="sans-serif" color="green">
  56.        Breakfast Fruit Plate
  57.    </font></b></dt>
  58.    <dd>Fresh seasonal fruit with yogurt or cottage cheese and Kelsey's famous
  59.        Bran Muffin. 3.95
  60.    </dd>
  61.  
  62.    <dt><b><font face="sans-serif" color="green">
  63.        Huevos Rancheros
  64.    </font></b></dt>
  65.    <dd>Two eggs on a flour tortilla with thick chili sauce, shredded
  66.        Monterey Jack and homemade salsa. 4.95
  67.    </dd>
  68.  
  69.    <dt><b><font face="sans-serif" color="green">
  70.        Eggs
  71.    </font></b></dt>
  72.    <dd>Any style with oven-roasted potatoes and toast. 2.95
  73.    </dd>
  74.  
  75.    <dt><b><font face="sans-serif" color="green">
  76.        Lox and Bagels
  77.    </font></b></dt>
  78.    <dd>Nova lox, cream cheese, onion, cucumber and tomatoes. 5.95
  79.    </dd>
  80. </dl>
  81.  
  82. </body>
  83. </html>
  84.  
  85.  


The errors are Line 20, Column 17: there is no attribute "background".
<body background="tan.jpg">✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 21, Column 10: there is no attribute "align".
<h5 align="center">✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Line 22, Column 63: end tag for "img" omitted, but OMITTAG NO was specified.
…rc="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br>✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 22, Column 3: start tag was here.
<img src="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br> Line 22, Column 67: end tag for "br" omitted, but OMITTAG NO was specified.
…kfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br>✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Line 22, Column 63: start tag was here.
…rc="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br> Line 25, Column 19: required attribute "id" not specified.
<map name="Menu">✉
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

There is no attribute 'background' - That is exactly the problem ... there is no such atribute, you can replace that with some CSS:
Code: [ Select ]
body{
background-image:url('tan.jpg');
}
  1. body{
  2. background-image:url('tan.jpg');
  3. }


There is no attribute 'align' - Again, that is exactly the problem, you can replace that with CSS again:
Code: [ Select ]
h5{
text-align:center;
}
  1. h5{
  2. text-align:center;
  3. }


end tag for "img" omitted, but OMITTAG NO was specified. - basically it is saying that XHTML uses self closing tags, and img is one of those elements that use a self closing tag, so the code should just change to:
Code: [ Select ]
<img src="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu" />
Note the last slash (/)

That should sort it out ...
  • billblum
  • Born
  • Born
  • billblum
  • Posts: 1

Post 3+ Months Ago

Ok so what about this message.. I am stuck on this one myself

Line 22, Column 63: start tag was here.
…rc="breakfst.jpg" usemap="#Menu" alt="Breakfast Menu"><br> Line 25, Column 19: required attribute "id" not specified.
<map name="Menu">✉
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6249
  • Loc: Seattle, WA

Post 3+ Months Ago

The explanation for your error is right there in the error itself...

Quote:
Line 25, Column 19: required attribute "id" not specified.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 50 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.