teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

不正確な回答の取り消し

2020/07/29 14:41

投稿

kaz.Suenaga
kaz.Suenaga

スコア2042

answer CHANGED
@@ -1,11 +1,17 @@
1
1
  [https://html-coding.co.jp/annex/dictionary/html/tr/](https://html-coding.co.jp/annex/dictionary/html/tr/)
2
2
 
3
- trタグに「幅」を示す属性はないからです。
3
+ ~~trタグに「幅」を示す属性はないからです。~~
4
- trは「行」を示すタグであり、その幅は常にテーブル幅に依存します。
4
+ ~~trは「行」を示すタグであり、その幅は常にテーブル幅に依存します。~~
5
5
 
6
- 幅が存在するのはセルであり、そのタグは td や th です。
6
+ ~~幅が存在するのはセルであり、そのタグは td や th です。~~
7
7
 
8
+ (追記)
9
+ ↑上記についてはHTML5のタグとしてのwidth属性はありませんが、CSSのwidthプロパティという形では存在するので不正確でしたので取り消します。
10
+ ただし、trタグのHTML5の仕様自体は目を通すといいと思います。
8
11
 
12
+
13
+
14
+
9
15
  また、全体的にテーブルのHTMLがおかしいです。
10
16
  テーブルは `table` -> `tr` -> `th` または `td` という階層で示されるもので、文章などは th や td タグ内にかかれるものです。
11
17
  参照) [https://html-coding.co.jp/annex/dictionary/html/table/](https://html-coding.co.jp/annex/dictionary/html/table/)

1

書式の改善

2020/07/29 14:41

投稿

kaz.Suenaga
kaz.Suenaga

スコア2042

answer CHANGED
@@ -1,4 +1,4 @@
1
- https://html-coding.co.jp/annex/dictionary/html/tr/
1
+ [https://html-coding.co.jp/annex/dictionary/html/tr/](https://html-coding.co.jp/annex/dictionary/html/tr/)
2
2
 
3
3
  trタグに「幅」を示す属性はないからです。
4
4
  trは「行」を示すタグであり、その幅は常にテーブル幅に依存します。
@@ -7,5 +7,5 @@
7
7
 
8
8
 
9
9
  また、全体的にテーブルのHTMLがおかしいです。
10
- テーブルは table -> tr -> th または td という階層で示されるもので、文章などは th や td タグ内にかかれるものです。
10
+ テーブルは `table` -> `tr` -> `th` または `td` という階層で示されるもので、文章などは th や td タグ内にかかれるものです。
11
- 参照) https://html-coding.co.jp/annex/dictionary/html/table/
11
+ 参照) [https://html-coding.co.jp/annex/dictionary/html/table/](https://html-coding.co.jp/annex/dictionary/html/table/)