Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML] Validacia Input
Forum PHP.pl > Forum > Po stronie przeglądarki > HTML \ XHTML
siatkarzyna
Witam ! w poniższym kodzie wyskakują mi błedy. Nie wiem jak to poprawić żeby było dobrze.

  1. <div class="dodaj_kat">
  2. <h5>Nazwa Kategorii</h5>
  3. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
  4. <input class="styl" type="text" name="nazwa" />
  5. <input class="button" name="dodaj" type="submit" value=" Dodaj kategorie" />
  6. </form>
  7. </div>


<h3 class="invalid">Validation Output: 3 Errors </h3>
  1. Line 135, Column 52: 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 <input type="text" name="nazwa" class="styl" />

    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. Line 136, 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 …="submit" value=" Dodaj kategorie" />

    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. Line 158, Column 11: end tag for "tbody" which is not finished </tbody>

    Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

    Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.
Pawel_W
zgodnie ze standardami input musi być między fieldset winksmiley.jpg

poprawnie:
  1. <div class="dodaj_kat">
  2. <h5>Nazwa Kategorii</h5>
  3. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
  4. <input class="styl" type="text" name="nazwa" />
  5. <input class="button" name="dodaj" type="submit" value=" Dodaj kategorie" />
  6. </form>
  7. </div>

obramowanie możesz ukryć ;]
siatkarzyna
Dzięki pomogło !
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.