By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,208 Members | 1,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,208 IT Pros & Developers. It's quick & easy.

Im in school and need help with Validation

P: 1
I created a page and I have tried to validate numerous times with no success. My page is still showing 3 errors... I have been working on these for hours and I can really use some help..

The codes are as follows:

Below are the results of checking this document for XML well-formedness and validity.

Error Line 7, column 9: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified .
<p class=MsoNormal>

Error Line 8, column 19: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag .
<div align="center">
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>").

Error Line 17, column 6: end tag for "p" omitted, but OMITTAG NO was specified .
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

Info Line 7, column 0: start tag was here .
<p class=MsoNormal>

Source Listing
Below is the source input I used for this validation:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<p class=MsoNormal>
<div align="center">
<h3>Hi D.I... I'm still alive and trying very hard to keep up with the class :)</h3>
<p><font face="arial" size="4" color="#0000bb">Check out the following links</font></p>
<p><font face="arial" size="4" color="#0000bb"><a href="">Play Page</a></font></p>
<p><font face="arial" size="4" color="#0000bb"><a href="">Personal Page</a></font></p>
<p><font face="arial" size="4" color="#0000bb"><a href="">Project Page</a></font></p>
<p><font face="arial" size="4" color="#0000bb"><a href="">Web110</a></font></p>
Mar 13 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 7,435
class names must be enclosed in quotes.
You don't have a closing </p> for your first one. Also, that <p> encloses a <div>. <p> can only contain inline elements while <div> is a block level element.
In addition, the <font> tag has been deprecated. You should be using css.

A further note, the msonormal class is telling me you are trying to use Word as a web page creator. Word creates horrendous, invalid code. Don't use it.
Mar 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.