html-minifier icon indicating copy to clipboard operation
html-minifier copied to clipboard

please try <tfoot> and <thead> tag

Open gaoyia opened this issue 5 years ago • 3 comments

<table border="1">
  <thead>
    <tr>
      <th>表头1</th>
      <th>表头2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>body1</td>
      <td>body2</td>
    </tr>
    <tr>
      <td>body3</td>
      <td>body4</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>tfoot1</td>
      <td>tfoot2</td>
    </tr>
  </tfoot>
</table>

Preserve line-breaks == false

<table border=1><thead><tr><th>表头1<th>表头2<tbody><tr><td>body1<td>body2<tr><td>body3<td>body4<tfoot><tr><td>tfoot1<td>tfoot2</table>

miss </tfoot> and </thead> and </th></td> </tr>

gaoyia avatar Dec 05 '19 06:12 gaoyia

Some of those are optional tags, like </li>.

DamonHD avatar Dec 05 '19 17:12 DamonHD

https://blog.teamtreehouse.com/to-close-or-not-to-close-tags-in-html5

DamonHD avatar Dec 06 '19 21:12 DamonHD

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead

Tag omission | The start tag is mandatory. The end tag may be omitted if there is no more content in the parent <table> element.

gaoyia avatar Dec 08 '19 03:12 gaoyia