login  Naam:   Wachtwoord: 
Registreer je!
 Forum

W3 valid krijgen?

Offline Frederic - 13/08/2005 20:38
Avatar van FredericPHP ver gevorderde 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.

...el="stylesheet" href="CSS/Pagina.css" type="text/css" />

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).

&#9993;
# Error Line 51 column 5: character data is not allowed here.

Gebruikersnaam

&#9993;
# 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>").

&#9993;
# 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" >

&#9993;
# 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.

..." type="submit" name="Submit" value="Inloggen" >

&#9993;
# 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 />

&#9993;
# 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:
  1. <html>
  2. <head>
  3. <title>FadeToLife V3 &bull A Crossroad of Ideas</title>
  4. <link rel="stylesheet" href="CSS/Pagina.css" type="text/css" />


En de andere fouten gaan over een inlogform:


  1. <form id="inloggen" method="post" action="?Pagina=inloggen">
  2. Gebruikersnaam
  3. <input class="menu" name="gebruikersnaam" type="text" id="gebruikersnaam" size="15" >
  4. Wachtwoord
  5. <input class="menu" name="wachtwoord" type="password" id="wachtwoord" size="15" >
  6. <input class="menu" type="submit" name="Submit" value="Inloggen" >
  7. </form>

15 antwoorden

Gesponsorde links
Offline Voldemort - 13/08/2005 20:53
Avatar van Voldemort PHP ver gevorderde
  1. <form id="inloggen" method="post" action="?Pagina=inloggen">
  2. Gebruikersnaam
  3. <input class="menu" name="gebruikersnaam" type="text" id="gebruikersnaam" size="15" />
  4. Wachtwoord
  5. <input class="menu" name="wachtwoord" type="password" id="wachtwoord" size="15" />
  6. <input class="menu" type="submit" name="Submit" value="Inloggen" />
  7. </form>


Bij de inputs je / vergeten aan het einde.
Offline Tuinstoel - 13/08/2005 20:54
Avatar van Tuinstoel PHP expert En & moet &amp; worden, anders is hij ook niet valid.Vergeet ook niet dat je alles in kleine letters moet doen bij xhtml valid.
Offline Scott - 13/08/2005 20:55
Avatar van Scott Gouden medaille

PHP ver gevorderde
Je moet de pagina wel een doctype meegeven he, dan herkent hij het pas alszijnde een XHTML pagina.

Verder moet je tekst en inputs tussen een <p> oid zetten, dat zijn de andere fouten die gegenereerd worden.

Let ook op: je inputs eindigen op 'size="15" >'. Hier moet nog een / bij, bovendien mag je geen size meer gebruiken, los dit op dmv CSS 
Offline Barato - 13/08/2005 21:13
Avatar van Barato Nieuw lid @Scott: je mag wel size gebruiken en de rest van je bericht slaat nergens op of is al gezegd.

die eerste fout (met <link> voor css file) wordt veroorzaakt door de ontbrekende puntkomma achter &bull
Offline Frederic - 13/08/2005 21:18
Avatar van Frederic PHP ver gevorderde Ik heb de / toegevoegd, maar nog steeds blijven die 7 error's! Vooral die CSS melding vind ik echt raar...
Offline Barato - 13/08/2005 21:19
Avatar van Barato Nieuw lid heb je de complete pagina ergens online staan??
Offline Frederic - 13/08/2005 21:25 (laatste wijziging 27/08/2011 00:24)
Avatar van Frederic PHP ver gevorderde Ik heb alle raad die hier staat toegepast, maar blijf met volgende error's zitten:
Citaat:
# Error Line 7 column 62: character data is not allowed here.

...el="stylesheet" href="CSS/Pagina.css" type="text/css" />

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).

&#9993;
# 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>").

&#9993;
# Error Line 52 column 101: character data is not allowed here.

...ebruikersnaam" style="width:100px;" />

&#9993;
# 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;" />

&#9993;
# Error Line 54 column 97: character data is not allowed here.

...d="wachtwoord" style="width:100px;" />

&#9993;
# 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.

..." type="submit" name="Submit" value="Inloggen" />

&#9993;
# 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 />

&#9993;
# Error Line 117 column 5: character data is not allowed here.

<br />




En het form dat niet wil validaten:
  1. <p><b>Welkom, gast</b></p>
  2. <form id="inloggen" method="post" action="?Pagina=inloggen">
  3. <p>Gebruikersnaam</p>
  4. <input class="menu" name="gebruikersnaam" type="text" id="gebruikersnaam" style="width:100px;" />
  5. <p>Wachtwoord</p>
  6. <input class="menu" name="wachtwoord" type="password" id="wachtwoord" style="width:100px;" />
  7. <input class="menu" type="submit" name="Submit" value="Inloggen" />
  8. </form>
Offline Barato - 13/08/2005 21:27
Avatar van Barato Nieuw lid probeer je hem toevallig als xhtml 1.0 strict of xhtml 1.1 te valideren?? zoja doe eens gewoon xhtml transitional
Offline Frederic - 13/08/2005 21:29
Avatar van Frederic PHP ver gevorderde 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>").

&#9993;
# 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" />

&#9993;
# 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.

...type="submit" name="Submit" value="Inloggen" />

&#9993;
# 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.

<br />

Bij dit script:
  1. <p><b>Welkom, gast</b></p>
  2. <form id="inloggen" method="post" action="?Pagina=inloggen">
  3. <p>Gebruikersnaam</p>
  4. <input class="menu" name="gebruikersnaam" type="text" id="gebruikersnaam" style="width:100px;" />
  5. <p>Wachtwoord</p>
  6. <input class="menu" name="wachtwoord" type="password" id="wachtwoord" style="width:100px;" />
  7. <input class="menu" type="submit" name="Submit" value="Inloggen" />
  8. </form>
Offline Barato - 13/08/2005 21:34
Avatar van Barato Nieuw lid 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.
Offline Scott - 13/08/2005 22:15 (laatste wijziging 13/08/2005 22:16)
Avatar van Scott Gouden medaille

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 
Offline Frederic - 13/08/2005 22:43
Avatar van Frederic PHP ver gevorderde 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?
Offline Scott - 13/08/2005 23:20
Avatar van Scott Gouden medaille

PHP ver gevorderde
<div style="margin: 0 auto; width: _hier de breedte die je wilt_">
Offline Maarten - 13/08/2005 23:51
Avatar van Maarten Erelid @Scott:

is het niet

  1. <div style="margin-left: auto; margin-right: auto; width: ...px ">BLUUUH</div>


?
Offline Scott - 13/08/2005 23:55
Avatar van Scott Gouden medaille

PHP ver gevorderde
Als je margin maar twee "argumenten" meegeeft, geldt het eerste voor boven en onder, het tweede voor links en rechts 
Gesponsorde links
Je moet ingelogd zijn om een reactie te kunnen posten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.238s