Link to home
Start Free TrialLog in
Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on

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
SOLUTION
Avatar of 10023
10023

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Eghtebas

ASKER

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  https://www.experts-exchange.com/questions/28504180/Preparing-asp-net-website-for-iPad-users-html-version.html
Avatar of 10023
10023

My dreamweaver output for XHTML 1.0 Transitional
User generated image
Avatar of Gary
"&nbsp" has been deprecated
LMAO
Move ..trying to get it so you can read it:  
User generated image
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?
@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>
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
You use the HTML equivalent.
&#160
Hi Dave Baldwin,

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

Mike
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Gary,

Is there a need to add ; at he end?

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

Mike
I wasn't aware of the asp issue.