无法验证html文件,无法确定问题所在

时间:2021-04-10 21:10:32

I'm having a problem with HTML validation, and can't figure out why.

我遇到了HTML验证问题,无法找出原因。

I get 4 errors below:

我在下面收到4个错误:

http://pokit.org/get/?c6b1a535084f58d1147ada962484c4fa.jpg

The code is listed on link below:

该代码列在以下链接中:

http://pastebin.com/KYitekMU

1 个解决方案

#1


According to the reference you are required to insert a <legend> tag as first element of a <fieldset>.

根据参考,您需要插入标记作为

的第一个元素。

<form action="blank" id="formCreate">
    <fieldset id="fieldSetCreate">
      <legend>Input form</legend>
      <label for="nameCreate">Naziv </label>
      <input type="text" name="nameCreate" id="nameCreate" class="text ui-widget-content ui-corner-all">
      <label for="descriptionCreate">Opis</label>
      <input type="text" name="descriptionCreate" id="descriptionCreate" class="text ui-widget-content ui-corner-all">
      <label for="priceCreate">Cijena</label>
      <input type="text" name="priceCreate" id="priceCreate" class="text ui-widget-content ui-corner-all">

      <input type="submit" tabindex="1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>

Additionally the second form should also have a <legend> tag:

另外,第二个表单还应该有一个标签:

<form action="blank" id="formEdit">
    <fieldset id="fieldSetEdit">
      <legend>Input form</legend>
      <label for="nameEdit">Naziv </label>
      <input type="text" name="nameEdit" id="nameEdit"class="text ui-widget-content ui-corner-all">
      <label for="descriptionEdit">Opis</label>
      <input type="text" name="descriptionEdit" id="descriptionEdit" class="text ui-widget-content ui-corner-all">
      <label for="priceEdit">Cijena</label>
      <input type="text" name="priceEdit" id="priceEdit" class="text ui-widget-content ui-corner-all">

      <input type="submit" tabindex="1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>

#1


According to the reference you are required to insert a <legend> tag as first element of a <fieldset>.

根据参考,您需要插入标记作为

的第一个元素。

<form action="blank" id="formCreate">
    <fieldset id="fieldSetCreate">
      <legend>Input form</legend>
      <label for="nameCreate">Naziv </label>
      <input type="text" name="nameCreate" id="nameCreate" class="text ui-widget-content ui-corner-all">
      <label for="descriptionCreate">Opis</label>
      <input type="text" name="descriptionCreate" id="descriptionCreate" class="text ui-widget-content ui-corner-all">
      <label for="priceCreate">Cijena</label>
      <input type="text" name="priceCreate" id="priceCreate" class="text ui-widget-content ui-corner-all">

      <input type="submit" tabindex="1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>

Additionally the second form should also have a <legend> tag:

另外,第二个表单还应该有一个标签:

<form action="blank" id="formEdit">
    <fieldset id="fieldSetEdit">
      <legend>Input form</legend>
      <label for="nameEdit">Naziv </label>
      <input type="text" name="nameEdit" id="nameEdit"class="text ui-widget-content ui-corner-all">
      <label for="descriptionEdit">Opis</label>
      <input type="text" name="descriptionEdit" id="descriptionEdit" class="text ui-widget-content ui-corner-all">
      <label for="priceEdit">Cijena</label>
      <input type="text" name="priceEdit" id="priceEdit" class="text ui-widget-content ui-corner-all">

      <input type="submit" tabindex="1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>