回答編集履歴

2

a

2023/06/02 03:04

投稿

shinoharat
shinoharat

スコア1676

test CHANGED
@@ -4,14 +4,14 @@
4
4
  ```html:こういうのはダメ
5
5
  <table>
6
6
  <div></div>
7
- <table>
7
+ </table>
8
8
  ```
9
9
 
10
10
  table の外に出すか、<td> の中に入れれば問題ありません。
11
11
 
12
12
  ```html:OKな例1
13
13
  <table>
14
- <table>
14
+ </table>
15
15
  <div></div>
16
16
  ```
17
17
 
@@ -22,7 +22,7 @@
22
22
  <div></div>
23
23
  </td>
24
24
  </tr>
25
- <table>
25
+ </table>
26
26
  ```
27
27
 
28
28
  【修正例】

1

a

2023/06/02 03:02

投稿

shinoharat
shinoharat

スコア1676

test CHANGED
@@ -1,5 +1,5 @@
1
1
  table を閉じる位置がおかしいと思います。
2
- table の直下に置いて良いのは、 caption, thead, tbody, tr, ... など一部のタグのみなので、 div を入れてはいけません。
2
+ table の直下に置いて良いのは、 caption, thead, tbody, tr, ... など一部のタグのみで、 div を入れてはいけません。
3
3
 
4
4
  ```html:こういうのはダメ
5
5
  <table>
@@ -7,7 +7,6 @@
7
7
  <table>
8
8
  ```
9
9
 
10
- HTML のルールに違反しているので、cssがうまく適用されないのだと思います。
11
10
  table の外に出すか、<td> の中に入れれば問題ありません。
12
11
 
13
12
  ```html:OKな例1