HTML validation question...

Question: How can I correct the error shown on the attached image?

Thank you.

Here is the code at line 10 (matches line 27 in my page):
Line 27, Column 92: entity was defined here:
…2.png" onclick="Image1_Click" /><span>&nbsp;&nbsp;&nbsp;<%= Session["YYYY"] %>…

[embed=file 868249]
<td width="214" colspan="2">
   <div class="miniChart">
      <asp:ImageButton ID="Image1" class="SmallMonthlyCharts" Runat="server" 
         ImageUrl="~/image/2013_1_Region1_101_2_Site02.png" onclick="Image1_Click"/>

      <span>&nbsp;&nbsp;&nbsp;<%= Session["YYYY"] %>,&nbsp;M1&nbsp;-&nbsp;%</span>
   </div>
</td>

Open in new window

htmlValidation.png
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

10023Web site maintenance and designCommented:
Just at first glance "&nbsp" has been deprecated and does not pass certain kinds of validation...do you need a substitute and what kind of validation are you doing?
0
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
XHTML 1.0 Transitional, utf-8

But, in responding to your post, I noticed that doc type has defaulted to XLM.

I originally had set it XHTML 1.0 Transitional but in the process of going through some other files, it has been reset to XML. I possibly had on detect automatically.

Your question helped me with this issue. I have another question if you have a couple of minutes to comment on. I will close this question shortly.

Mike

Edited: Please see  http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_28504180.html
0
10023Web site maintenance and designCommented:
My dreamweaver output for XHTML 1.0 Transitional
val.jpg
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

GaryCommented:
"&nbsp" has been deprecated
LMAO
0
10023Web site maintenance and designCommented:
Move ..trying to get it so you can read it:  
val--Large-.jpg
0
Dave BaldwinFixer of ProblemsCommented:
That's very odd.  I have pages with 3 &nbsp; code in a row and they pass just fine.  However, <%= Session["YYYY"] %> should not be showing in the validation page.  That you can see it means that it is not being interpreted on the server.  That can throw the entire validation process off.  Maybe you named the page *.html instead of *.asp or *.aspx?
0
GaryCommented:
@10023
You do understand the code above is .net and will obviously not validate?

@eghtebas
XHTML is very strict about what you can and cannot use, everything has to be properly nested and always closed, lowercase etc.
&nbsp; is not in the XHTML schema and ergo invalid.

Unless you have a specific reason for using XHTML you should be using just
<!doctype html>
0
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Hi 10023,

re> do you need a substitute...

Yes, what can I substitute with?

Hi Gary,

Thank you.

Mike

Edited:
Gary,

re:>  .net and will obviously not validate?
I was going to look for the solution for that part next. I meant to tackle them incrementally.

Yes, I rather say with html
0
GaryCommented:
You use the HTML equivalent.
&#160
0
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Hi Dave Baldwin,

The page extension is .master (asp.net).

Mike
0
GaryCommented:
Yes, I rather say with html
Then just use
<!doctype html>

This is the HTML5 doctype and should be the one to use for any webpage unless you specifically need an XHTML page

If your .net code is showing in the source then Dave has given you the possible reason above.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Gary,

Is there a need to add ; at he end?

Like replacing &nbsp;&nbsp;  with &#160;&#160;

Mike
0
GaryCommented:
0
10023Web site maintenance and designCommented:
I wasn't aware of the asp issue.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.