browser: minor html validation fixes
[sheet.git] / browser.plp
index c2a5d256dcb75b1e611bb8807b270beb7a4aa216..13e6b5e1ac7f30f6d3e97091a5d344436172db31 100644 (file)
@@ -39,7 +39,6 @@ given ($get{usage} // 'wm') {
 :>.
 </p>
 
-<div id="browser">
 <:
 my $caniuse = do 'browser-support.inc.pl' or die $! || $@;
 $_->{verrelease} = {
@@ -131,7 +130,8 @@ for my $browser (@browsers) {
        ) for @{ $versions{$browser} };
 }
 print '<td>' x 1;
-print "</thead>\n";
+say '</thead>';
+say '<tfoot>', $header, '</tfoot>';
 
 sub featurescore {
        # relative amount of support for given feature
@@ -242,6 +242,7 @@ sub sayusagecol {
        print '<td>', int featurescore($caniuse->{data}->{$id}->{stats}) / $maxscore * 100;
 }
 
+say '<tbody>';
 for my $id (sort {
            featurescore($caniuse->{data}->{$b}->{stats})
        <=> featurescore($caniuse->{data}->{$a}->{stats})
@@ -254,8 +255,8 @@ for my $id (sort {
        sayusagecol($id);
        say '</tr>';
 }
-print '<tfoot>', $header;
-print '</table>';
+say '</tbody>';
+say '</table>';
 
 sub formathtml {
        my $ref = defined wantarray ? [@_] : \@_;
@@ -282,8 +283,7 @@ sub showversions {
        return join('‒', @span);
 }
 
-:></div>
-
+:>
 <hr>
 
 <div class="legend">
@@ -323,6 +323,6 @@ sub showversions {
        </div>
 </div>
 
-<script src="/searchlocal.js"></script>
-<script> prependsearch(document.getElementById('intro')) </script>
+<script type="text/javascript" src="/searchlocal.js"></script>
+<script type="text/javascript"> prependsearch(document.getElementById('intro')) </script>