th ... ⁄th syntax
Syntax th
- start tag required: <th>
- end tag optional IF...: <⁄th>
<⁄th> optional IF...:
- th element is immediately followed by another th element Syntax 1 OR
- th element is immediately followed by a td element Syntax 2 OR
- there is no more content after th element inside the parent element, tr Syntax 3
Examples th syntax
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <> <> <>..<>.. </> ... </> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <> <> <>..<>.. </> ... </> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <> <> <>.. </> ... </> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <> <> <>...</> </> ... </> </> </> </> |
Video demonstration th element, syntax
HTML5 th element, syntax Tutorial
min | video details |
---|---|
00:04 | video tutorial: th element, syntax |
00:10 | adding th element in page |
00:15 | th element has: - a start tag: <th> - and an end tag: <⁄th> |
00:22 | <⁄th> end tag may be omitted when th element is immediately followed by another th or td element, like this: |
00:28 | <⁄th> end tag may be omitted if there is no more content inside the parent element: tr |