Zou iemand me eens kunnen helpen, want ik krijg mijn pagina maar niet XHTML valid, terwijl ik niet goed snap wat de fout is
Dit krijg ik terug van de validatie engine:
Citaat:
# Error Line 7 column 62: character data is not allowed here.
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).
✉
# Error Line 51 column 5: character data is not allowed here.
Gebruikersnaam
✉
# Error Line 52 column 89: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
..."text" id="gebruikersnaam" size="15" >
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>").
✉
# Error Line 54 column 85: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
..."password" id="wachtwoord" size="15" >
✉
# Error Line 55 column 70: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
✉
# Error Line 117 column 4: document type does not allow element "BR" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
<br />
✉
# Error Line 117 column 5: character data is not allowed here.
<br />
De eerste fout vind ik echt raar, want dat is gewoon een CSS file:
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>) or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes).
✉
# Error Line 52 column 100: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
...gebruikersnaam" style="width:100px;" />
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>").
✉
# Error Line 52 column 101: character data is not allowed here.
...ebruikersnaam" style="width:100px;" />
✉
# Error Line 54 column 96: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
...id="wachtwoord" style="width:100px;" />
✉
# Error Line 54 column 97: character data is not allowed here.
...d="wachtwoord" style="width:100px;" />
✉
# Error Line 55 column 70: document type does not allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
✉
# Error Line 117 column 4: document type does not allow element "BR" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "DIV", "PRE", "ADDRESS", "FIELDSET", "INS", "DEL" start-tag.
<br />
✉
# Error Line 117 column 5: character data is not allowed here.
Ja, hij staat op strict!
Maar ondertussen is het probleem van de head ook al opgelost, heb alles eens even opnieuw getypt en toen ging het wel!
Dus nu heb ik deze fouten nog:
Citaat:
# Error Line 53 column 80: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
...am" type="text" id="gebruikersnaam" />
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>").
✉
# Error Line 55 column 76: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
...twoord" type="password" id="wachtwoord" />
✉
# Error Line 56 column 71: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
✉
# Error Line 118 column 5: document type does not allow element "br" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
test hem gewoon eens even met transitional, dat zou moeten werken.
voor strict zul je waarschijnlijk de input en br tags binnen een van de genoemde elementen moeten zetten, zoals de validator netjes meldt.
Scott - 13/08/2005 22:15 (laatste wijziging 13/08/2005 22:16)
PHP ver gevorderde
@ Barato: Idd, size mag wel, maar als hij toch CSS gebruikt, waarom dan niet met CSS doen ?
Kijk ook ff naar de tijden waarop het gepost is: mijn post scheelt twee minuten met die van Voldemort; je hebt er zeker geen rekening mee gehouden dat ik géén tovenaar ben en alles gewoon moet typen, waar ik schijnbaar langer over doe dan 2 minuten ?
Bovendien is het geen gelul dat tekst en input tussen <p> moeten, als hij strict doctype gebruikt (en ik hem aanraad)... En het gebruik van een doctype is ook niet zo verkeerd hoor, immers, dat zorgt ervoor dat de pagina als XHTML beschouwd wordt... Dit was nog niet gezegd en is ook geen gelul
Het is me gelukt om alles XHTML valid strict te krijgen door div's rond alle inputvelden te plaatsen!
Thanks iedereen!
Laatste vraagje (nu we toch bezig zijn ):
ik gebruikte lange tijd
<div align="center">
waardoor tabellen enz mooi in het midden kwamen van de pagina, maar de uitlijning binnenin de tabel niet in gedrang kwam. Nu, dit is niet XHTML strict valid, dus ken jij een oplossing hoe dit probleem weg te krijgen?