![]() |
Help Validating XHTML Strict 1.0
Need some help validating this,can't seem to find the error at all...
Its for college btw. Error taken from W3 Schools XHTML Validator Error Line 99, Column 7: end tag for "div" omitted, but OMITTAG NO was specified </body> You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". Code:
<?xml version="1.0" encoding="UTF-8"?> |
We have a policy of not doing other people's homework, but we do offer hints.
Usually when I have a well-formedness problem like this that I can't solve, I make a copy of the document in question. Then I take the copy and start removing sections that I know are good. Eventually, I'll isolate where I went wrong. This is a technique that works really well in any scripting language, too. Another option is to use an editor that supports either code folding or syntax highlighting. Komodo Edit does both, and it's free: I've used it for years. I suspect that with code folding, you'll find the error within minutes. :thumbsup: |
Ok thanks :) can you suggest and editor? Seeing as its only one error can you give me a BIG Clue,need to get this validated today
|
It's telling you that you have opened a <div> but have not closed it with a corresponding </div>. You could count the <div> elements and see there is one less </div>. Just pair them up and decide where you forgot a <div>. You could also put a comment (like <!-- end of "page" div -->) at each of the </div> and it might make it easier to spot a missing one.
Dave |
Quote:
P.S. When I tried your document in Komodo, it wasn't just one error... that's how XML works: at the first well-formedness error, it stops processing. P.P.S. Try http://validator.w3.org/#validate_by_upload for validation. :-) |
Thank you! Fixed the error and now the validator is throwing out more errors
Quote:
|
Code:
<img src="Armoud Kill.png"alt="Top Part"/> |
Quote:
Code:
<img border="0" src="/images/pulpit.jpg" alt="Pulpit rock" width="304" height="228">http://www.w3schools.com/html/tryit....ml_pulpitimage I actually am so stressed now :( |
Not seeing any error :( this is so stressful
I checked on w3 shools and according to that site thats thew way your meant to link images. :( |
Let'ssee,howdoIputthismoreclearly.Stepbackandlookatthecodeasfarasitneedstobeparsedintoindividualtags ,attributesandstrings...Dave
|
Quote:
Im not asking for alot,just a few simeple errors...im new to programming Guess il go google it. |
Sorry, I thought that would have given you the tip. Tags and attributes in html are separated by white space (spaces, tabs, returns) so that your browser knows where they start and end. The formatting of html is rather loose, but you do need to adhere to a few common rules like that. That line of code is missing white space between the string and the following attribute.
Dave |
Many thanks man! Really appreciate it,its passed now :cool:
|
So, what'd you learn from this? :) Don't just quote Dave - put it in your own words.
(I'm in college myself - but I enjoy taking the role of a mentor from time to time.) |
| All times are GMT +1. The time now is 06:29 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.