Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML] Validacia Input
siatkarzyna
post
Post #1





Grupa: Zarejestrowani
Postów: 85
Pomógł: 4
Dołączył: 1.07.2008

Ostrzeżenie: (0%)
-----


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. (IMG:http://validator.w3.org/images/info_icons/error.png) 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. (IMG:http://validator.w3.org/images/info_icons/error.png) 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. (IMG:http://validator.w3.org/images/info_icons/error.png) 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.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
Pawel_W
post
Post #2





Grupa: Zarejestrowani
Postów: 1 675
Pomógł: 286
Dołączył: 15.06.2009
Skąd: Wieliczka

Ostrzeżenie: (0%)
-----


zgodnie ze standardami input musi być między fieldset (IMG:http://forum.php.pl/style_emoticons/default/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ć ;]
Go to the top of the page
+Quote Post
siatkarzyna
post
Post #3





Grupa: Zarejestrowani
Postów: 85
Pomógł: 4
Dołączył: 1.07.2008

Ostrzeżenie: (0%)
-----


Dzięki pomogło !
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.09.2025 - 00:05