I've got a html Error in Visual Studio Code Editor

Advertisements

after a Visual Studio Code Update my Code have some Errors in the Editor but the Code works fine.

Can someone please tell my how I can disable erros like this?

Form elements must have labels: Element has no title attribute Element has no placeholder attributeMicrosoft Edge Toolsaxe/forms

The Error is in this 3 lines

        <input type="text" name="inputkommen" id="inputkommen" />
        <input type="text" name="inputgehen" id="inputgehen" />
        <input type="text" name="gehen" id="outputumrechnen" />

Full Code bellow

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Überstunden-Umrechner</title>
    <link rel="stylesheet" href="../style/Overtime.css" />
    <link rel="icon" href="../Bilder/sun.png" />
  </head>
  <body>
    <body>
      <script src="../scripts/Overtime.js"></script>
      <div id="Sonne"></div>
      <div class="layout">
        <div id="rectangle"></div>
        <h1 id="ToHours">Überstunden Umrechner</h1>

        <input type="text" name="inputkommen" id="inputkommen" />
        <button id="kommen" onclick="wannKannIchKommen()">kommen</button>
        <input type="text" name="inputgehen" id="inputgehen" />
        <button id="gehen" onclick="wannKannIchGehen()">gehen</button>
        <input type="text" name="gehen" id="outputumrechnen" />
        <button id="umrechnen" onclick="wieVieleUeberstundenBekommeIch()">
          überstunden
        </button>
      </div>
    </body>
  </body>
  <footer></footer>
</html>

>Solution :

Does simply adding label tags like so solves your problem ?

<label for="inputkommen">Inputkommen</label>
<input type="text" name="inputkommen" id="inputkommen" />
    
<label for="inputgehen">Inputgehen</label>
<input type="text" name="inputgehen" id="inputgehen" />
    
<label for="gehen">Gehen</label>
<input type="text" name="gehen" id="outputumrechnen" />

Leave a ReplyCancel reply