validate., uhhh

Status
Niet open voor verdere reacties.

GambiaUser

Gebruiker
Lid geworden
18 jul 2009
Berichten
730
Ik ging ff door me site met w3 validator, kreeg ik deze fout:
Daar staat html (met regels er om heen):
Code:
25<div id="sidebar1" class="sidebar">
26<li>
27<h2>Menu</h2>

1. Error Line 26, Column 8: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


Wat betekent het?
 
Je hebt een <li> (element in een lijst) opgenomen in je HTML, maar het staat niet in een lijst (je maakt een lijst aan door <ol> of <ul> te doen, voor een geordende resp. niet geordende lijst)

Vergelijkbaar met deze code:

HTML:
<div id="haas">
<tr>Hoi</tr>
</div>

Je moet een <li> in een lijst definitie opnemen, anders werkt het niet .
 
Dat hele ding is:
HTML:
		<div id="sidebar1" class="sidebar">

			<ul>
				<li>
					<h2>Menu</h2>
					<ul>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/">Home</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Alstoerist.html">Toeristen</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Gaat.html">Geschiedenis</a></li>

						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/About Us.html">About Us</a></li>
						<li><a href="http://mirjamkoster.waarbenjij.nu">Verslagen</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/">Foto's stage MRC</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/news.html">Headlines</a></li>
					</ul>
				</li>
		</div>
 
Dat is niet wat de validator zegt.

Heb je het ergens online staan?
 
Het gaat om dit stuk:

HTML:
				<li>
					<h2>Menu</h2>
					<ul>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/">Home</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Alstoerist.html">Toeristen</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Gaat.html">Geschiedenis</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/About Us.html">About Us</a></li>

						<li><a href="http://mirjamkoster.waarbenjij.nu">Verslagen</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/">Foto's stage MRC</a></li>
						<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/news.html">Headlines</a></li>
					</ul>
				</li>

Je moet dus of bovenste <li> en onderste </li> weghalen, of er een <ul> of <ol> omheen zetten.
 
Wat kan ik hier aan doen? (Link)

1. Error Line 28, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/">Home</a></li>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
2. Error Line 29, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Alstoerist.html">Toeris



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
3. Error Line 30, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Gaat.html">Geschiedenis



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
4. Error Line 31, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/About Us.html">About Us



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
5. Error Line 32, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://mirjamkoster.waarbenjij.nu">Verslagen</a></li>



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
6. Error Line 33, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://www.xs4all.nl/~hfkoster/">Foto's stage MRC</a></li>



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
7. Error Line 34, Column 10: document type does not allow element "li" here; missing one of "ul", "ol" start-tag

<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/news.html">Headlines</a


The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
 
Laatst bewerkt:
HTML:
<ul>
	<li><h2>Menu</h2>
		<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/">Home</a></li>
		<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Alstoerist.html">Toeristen</a></li>
		<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Gaat.html">Geschiedenis</a></li>
		<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/About Us.html">About Us</a></li>
		<li><a href="http://mirjamkoster.waarbenjij.nu">Verslagen</a></li>
		<li><a href="http://www.xs4all.nl/~hfkoster/">Foto's stage MRC</a></li>
		<li><a href="http://www.xs4all.nl/~hfkoster/Gambia/news.html">Headlines</a></li>
	</li>
</ul>

Daar zet je <li>'s direct in een <li> en dat mag dus niet...
 
HTML:
<ul>
    <li><h2>Menu</h2>
        <ul>
            <li><a href="http://www.xs4all.nl/~hfkoster/Gambia/">Home</a></li>
            <li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Alstoerist.html">Toeristen</a></li>
            <li><a href="http://www.xs4all.nl/~hfkoster/Gambia/Gaat.html">Geschiedenis</a></li>
            <li><a href="http://www.xs4all.nl/~hfkoster/Gambia/About Us.html">About Us</a></li>
            <li><a href="http://mirjamkoster.waarbenjij.nu">Verslagen</a></li>
            <li><a href="http://www.xs4all.nl/~hfkoster/">Foto's stage MRC</a></li>
            <li><a href="http://www.xs4all.nl/~hfkoster/Gambia/news.html">Headlines</a></li>
        </ul>
    </li>
</ul>
 
Status
Niet open voor verdere reacties.

Nieuwste berichten

Terug
Bovenaan Onderaan