Hallo,
Wenn ich meine Seite durch den w3c validator prüfen lasse, gibt er mir folgende fehlermeldung:
So wie ich das verstehe ist es nicht erlaubt einen Link direkt in den <body> zu setzen, ohne ihn vorher zumindest in ein Block Element oder in eins der aufgeführten Elemente zu verschachteln? Gibt es so eine Regel?
hier noch der entsprechende Code:
Wenn ich meine Seite durch den w3c validator prüfen lasse, gibt er mir folgende fehlermeldung:
document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
<a id="header" href="#"></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>").
So wie ich das verstehe ist es nicht erlaubt einen Link direkt in den <body> zu setzen, ohne ihn vorher zumindest in ein Block Element oder in eins der aufgeführten Elemente zu verschachteln? Gibt es so eine Regel?
hier noch der entsprechende Code:
HTML:
[...]
</head>
<body>
<a id="header" href="#"></a>
<ul id="topnavi">
<li><a href="#">Home</a></li>
<li><a href="contact.htm">Contact</a></li>
[...]
Anhänge
Zuletzt bearbeitet: