473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

W3C Validator gives error. (html very simple code)

Hello
Following code gives me error when I try to validate it from validator.w3.org. I copied this code from book and image file is in the same folder as html file. Help me out.
Expand|Select|Wrap|Line Numbers
  1. <?xml version = "1.0" encoding = "utf-8">
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4.  
  5. <html xmlns = "http://www.w2.org/1999/xhtml">
  6.     <head>
  7.         <title>Images</title>
  8.     </head>
  9.  
  10.     <body>
  11.         <p>
  12.             <img src = "Desert.jpg" width = "1024" height = "768"
  13.                 alt = "The Desert" />
  14.  
  15.         </p>
  16.     </body>
  17. </html>
  18.  

1. Error Line 17, Column 8: entity end not allowed in processing instruction

</html>

2. Error Line 17, Column 8: end of document in prolog

</html>

This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and report any discrepancy.
Mar 17 '11 #1
1 3664
drhowarddrfine
7,435 Expert 4TB
You are missing the closing '?' of your xml declaration. Should be:
Expand|Select|Wrap|Line Numbers
  1. <?xml version = "1.0" encoding = "utf-8"?>
Do not use this! Unless you are serving as XHTML, only modern browsers know what to do with that line while most versions of IE just go into quirks mode. You should leave that line out.
Mar 17 '11 #2

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

Similar topics

8
by: eje | last post by:
IsNumeric(value) should return false if value "can not be successfully converted to a Double." Instead I get the following error message: "Input string was not in a correct format." I use the...
20
by: Sam | last post by:
Hi I'm learning to code with C++ and wrote some very simple code. I think it's consistent with every rule but always got compiling errors that I don't understand. The code include 5 files as...
1
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
4
by: IMS.Rushikesh | last post by:
Hi All, I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null)
3
by: Davíð Þórisson | last post by:
I don't get it... so simple code but it's bringing an error which goes away if I skip that <script Src="initialize.cs"> part... ("CS0038: Cannot access a nonstatic member of outer type...
6
by: vips | last post by:
Page_Load datagrid1.datasource=dataset1 //I am filling the datagrid and it works fine when page is displayed end ---------------
0
by: Pixie | last post by:
We are successfully getting a handle to a drive using createfile then using that handle to query the change journal using DeviceIOControl with the paramter FSCTL_QUERY_USN_DATA. However when we try...
10
by: Harsh_forC | last post by:
hello folks, here i m inserting d very simple code tat im trying to execute.. but still gettin d same error msg,.." Not enuf memory" #include<stdlib.h> #include<stdio.h> void main(void) {
12
by: arnuld | last post by:
in C++ Primer 4/3 Lippman says in chapter 3, section 3.3.1: vector<stringsvec(10); // 10 elements, each an empty string here is the the code output & output from my Debian box running "gcc...
8
by: autodidact | last post by:
I wrote a simple code to look up peoples numbers. But what if the user types in a name that is not on the list, how may i get my code to alert the user try again till a correct name is entered? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.