title: How do I not repeat the header of the table over and over again.?
body: <p>I have the problem that every time I have a record the header of the table is repeated, how do I eliminate that?</p>
  <p><a href="https://i.stack.imgur.com/2OYZ7.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I attach my code.</p>
  <pre><code>if(isset($_POST['btn1'])){
   
    $resultado = mysqli_query($con,&quot;SELECT * FROM estudiante&quot;);
    
    while($consulta = mysqli_fetch_array($resultado)){
      
      echo
        &quot;
        &lt;link rel=\&quot;stylesheet\&quot; type=\&quot;text/css\&quot; href=\&quot;styles/styleTable.css\&quot;&gt;
        &lt;body&gt;
      &lt;div id=\&quot;wrapper\&quot;&gt;
       &lt;h1&gt;Registro De Alumnos&lt;/h1&gt;
       
       &lt;table id=\&quot;keywords\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;0\&quot;&gt;
         &lt;thead&gt;
           &lt;tr&gt;
             &lt;th&gt;&lt;span&gt;Nombres y Apellidos&lt;/span&gt;&lt;/th&gt;
             &lt;th&gt;&lt;span&gt;Cedula&lt;/span&gt;&lt;/th&gt;
             &lt;th&gt;&lt;span&gt;Cod. Matricula&lt;/span&gt;&lt;/th&gt;
             &lt;th&gt;&lt;span&gt;Telefono&lt;/span&gt;&lt;/th&gt;
             &lt;th&gt;&lt;span&gt;Correo&lt;/span&gt;&lt;/th&gt;
             &lt;th&gt;&lt;span&gt;Direccion&lt;/span&gt;&lt;/th&gt;
             &lt;!--Se puede segui aunmentando aqui las columnas :D--&gt;
           &lt;/tr&gt;
         &lt;/thead&gt;
         &lt;tbody&gt;
           &lt;tr&gt;
             &lt;td class=\&quot;lalign\&quot;&gt; &quot;.$consulta['NombresApellidos'].&quot;&lt;/td&gt;
             &lt;td&gt;&quot;.$consulta['Cedula'].&quot;&lt;/td&gt;
             &lt;td&gt;&quot;.$consulta['CodigoMatricula'].&quot;&lt;/td&gt;
             &lt;td&gt;&quot;.$consulta['Telefono'].&quot;&lt;/td&gt;
             &lt;td&gt;&quot;.$consulta['Correo'].&quot;&lt;/td&gt;
             &lt;td&gt;&quot;.$consulta['Direccion'].&quot;&lt;/td&gt;
           &lt;/tr&gt;
         &lt;/tbody&gt;
       &lt;/table&gt;
      &lt;/div&gt; 
     &lt;/body&gt;
        
        &quot;;
    }
  
  
  
  }
  </code></pre>