[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

HTML validation question...

Posted on 2014-08-23
14
Medium Priority
?
161 Views
Last Modified: 2014-08-23
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
0
Comment
Question by:Mike Eghtebas
  • 5
  • 4
  • 4
  • +1
14 Comments
 
LVL 10

Assisted Solution

by:10023
10023 earned 600 total points
ID: 40280830
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
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40280842
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
 
LVL 10

Expert Comment

by:10023
ID: 40280848
My dreamweaver output for XHTML 1.0 Transitional
val.jpg
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 58

Expert Comment

by:Gary
ID: 40280851
"&nbsp" has been deprecated
LMAO
0
 
LVL 10

Expert Comment

by:10023
ID: 40280855
Move ..trying to get it so you can read it:  
val--Large-.jpg
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40280864
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
 
LVL 58

Expert Comment

by:Gary
ID: 40280867
@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
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40280869
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
 
LVL 58

Expert Comment

by:Gary
ID: 40280874
You use the HTML equivalent.
&#160
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40280876
Hi Dave Baldwin,

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

Mike
0
 
LVL 58

Accepted Solution

by:
Gary earned 1400 total points
ID: 40280880
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
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40280882
Gary,

Is there a need to add ; at he end?

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

Mike
0
 
LVL 58

Expert Comment

by:Gary
ID: 40280884
0
 
LVL 10

Expert Comment

by:10023
ID: 40280894
I wasn't aware of the asp issue.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question