Forum Moderators: phranque

Message Too Old, No Replies

Validating xhtml a page. Page won't validate. Please help.

Page is'nt validating. Tried fixing. Still won't work. Please help:)

         

frenzy77

8:44 am on Jun 23, 2005 (gmt 0)

10+ Year Member



Hi:)

I hope you guys can help.

Well, i'm trying to get this page to validate as xhtml transitional. The validator says i can't use the <ul>. It states that there is missing an object, applet, map, etc.

It says i might be missing a containing element or forgot to close a previous element.

*It also says i possibly tried to put a block level element inside an inline element.
*Also, it says that <br /> is not allowed here. Missing <li> tag.
*Also, it says that <ul class="indent"> is not allowed here. Missing an object, applet, map, etc.

**Q.1. Could you please show me how to fix this page? Could you please list a sample source code that validates as xhtml using a <ul> unordered list that indents?<<<

***>>>I am trying to create a <ul> list that starts as a few <li> list items and then indents a couple of pix for the next <li> list items list.

Here's the source code.

<html>
<head>

<title>

sitemap

</title>

<link rel="stylesheet" type="text/css" href="menu.css" />

<link rel="stylesheet" type="text/css" href="logo.css" />

</head>

<body>

<img src="logo-2.jpg" width="759" height="23" alt="abc" />

<div id="logo">

logo
</div>
<img src="logo-2.jpg" width="759" height="23" alt="xyz" />
<img src="logo-5.jpg" width="759" height="23" alt="xyz" />
<br />

<table width="100%" cellpadding="0" cellspacing="0">

<tr>
<td width="595">

<p class="xyz">

Sitemap<br />

<ul>

<li>
<a href="resources-1.html">Home</a>
</li>

<li>
<a href="resources-1.html">Resources 1</a>
</li>

<li>
<a href="resources-1.html">abc</a>
</li>

<li>
<a href="resources-1.html">payments</a>

Information
</li>

<li>
<a href="resources-1.html">Order</a>
Order
</li>

<li>
<a href="resources-1.html">Contact us</a>
Contact
</li>

<li>
<a href="resources-1.html">Faq</a>
</li>

<li>
<a href="resources-1.html">articles</a>
</li>

<br />
<br />

<li>
<b>Resources</b>
</li>

</ul>

<ul class="indent">

<li>
<a href="resources-1.html">repair</a>

</li>

<li>
<a href="resources-1.html">xyz list</a>

</li>

<li>
<a href="resources-1.html">Services</a>

</li>

<li>
<a href="resources-1.html">xyz</a>

</li>

<li>
<a href="resources-1.html">information</a>

</li>

<li>
<a href="resources-1.html">more information</a>

</li>

<li>
<a href="resources-1.html">xyz widgets</a>
</li>

</ul>

</p>

</td>
</tr>
</table>

</body>
</html>

*Please help.

Thank you very much for your help:)
I appreciate it.

frenzy77

Farix

1:44 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



I don't see a DocType declaration. Which DocType are you using? You also did not close a paragraph tag before starting the unsorted lists and you also have an orphan closing paragraph tag with no opening tag after the unsorted lists (lists can not be contained within a paragraph). I also see some line breaks in one of the unsorted lists that shouldn't be there either.

You should also clean things up a big as the code is hard to read. I had to reformat the code locally in order to spot the problems.

pageoneresults

2:35 pm on Jun 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



frenzy77, I think you are going to find that is just the first error you will encounter, there will most likely be others based on reviewing the above code.

In XHTML, all tags must be closed properly or the page won't validate.

frenzy77

5:37 am on Jun 24, 2005 (gmt 0)

10+ Year Member



Thanks for the help Farix and pageoneresults:)
I made the changes suggested.(closed <p>, deleted end </p> and deleted <br />.) It now validates as xhtml 1.0 transitional. Farix, the doctype is xhtml 1.0 transitional.
Also, i thought that a page was supposed to start with a <p>paragraph tag and then i could place the <ul>unordered tag and begin the <ul> list.

Q.1. I also have a question. In any html/xhtml page, can you start a page without a <p> tag? Such as:

<html>
<head>
</head>
<body>

<ul>
etc...
</ul>

</body>
</html>

Thanks again to the both of you for your help. I appreciate it:)

frenzy77