Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

66%
+2 −0
Meta Best practices for posting tabular data

For most purposes, the easiest approach is probably Markdown tables, as described in Wicket's answer. If you have requirements that Markdown tables do not support, such as merged cells, you can re...

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

Answer
#2: Post edited by user avatar trichoplax‭ · 2023-06-24T23:52:14Z (over 1 year ago)
Use "<thead>" and "<th>" instead of manual "<b>"
  • For most purposes, the easiest approach is probably Markdown tables, as described in [Wicket's answer](https://software.codidact.com/posts/288660/288698#answer-288698).
  • If you have requirements that Markdown tables do not support, such as merged cells, you can resort to HTML tables, which can be included directly in the raw text of a post.
  • For example, raw text like this:
  • ```html
  • <table>
  • <tr>
  • <td><b>header 1</b></td>
  • <td colspan="2"><b>header 2 (wide)</b></td>
  • <td><b>header 3</b></td>
  • </tr>
  • <tr>
  • <td>data A</td>
  • <td colspan="2" rowspan="2">data B (wide tall)</td>
  • <td>data C</td>
  • </tr>
  • <tr>
  • <td rowspan="2">data D (tall)</td>
  • <td rowspan="1">data E</td>
  • </tr>
  • <tr>
  • <td>data F</td>
  • <td>data G</td>
  • <td>data H</td>
  • </tr>
  • </table>
  • ```
  • Is rendered like this:
  • <table>
  • <tr>
  • <td><b>header 1</b></td>
  • <td colspan="2"><b>header 2 (wide)</b></td>
  • <td><b>header 3</b></td>
  • </tr>
  • <tr>
  • <td>data A</td>
  • <td colspan="2" rowspan="2">data B (wide tall)</td>
  • <td>data C</td>
  • </tr>
  • <tr>
  • <td rowspan="2">data D (tall)</td>
  • <td rowspan="1">data E</td>
  • </tr>
  • <tr>
  • <td>data F</td>
  • <td>data G</td>
  • <td>data H</td>
  • </tr>
  • </table>
  • For most purposes, the easiest approach is probably Markdown tables, as described in [Wicket's answer](https://software.codidact.com/posts/288660/288698#answer-288698).
  • If you have requirements that Markdown tables do not support, such as merged cells, you can resort to HTML tables, which can be included directly in the raw text of a post.
  • For example, raw text like this:
  • ```html
  • <table>
  • <thead>
  • <tr>
  • <th>header 1</th>
  • <th colspan="2">header 2 (wide)</th>
  • <th>header 3</th>
  • </tr>
  • </thead>
  • <tbody>
  • <tr>
  • <td>data A</td>
  • <td colspan="2" rowspan="2">data B (wide tall)</td>
  • <td>data C</td>
  • </tr>
  • <tr>
  • <td rowspan="2">data D (tall)</td>
  • <td rowspan="1">data E</td>
  • </tr>
  • <tr>
  • <td>data F</td>
  • <td>data G</td>
  • <td>data H</td>
  • </tr>
  • </tbody>
  • </table>
  • ```
  • Is rendered like this:
  • <table>
  • <thead>
  • <tr>
  • <th>header 1</th>
  • <th colspan="2">header 2 (wide)</th>
  • <th>header 3</th>
  • </tr>
  • </thead>
  • <tbody>
  • <tr>
  • <td>data A</td>
  • <td colspan="2" rowspan="2">data B (wide tall)</td>
  • <td>data C</td>
  • </tr>
  • <tr>
  • <td rowspan="2">data D (tall)</td>
  • <td rowspan="1">data E</td>
  • </tr>
  • <tr>
  • <td>data F</td>
  • <td>data G</td>
  • <td>data H</td>
  • </tr>
  • </tbody>
  • </table>
#1: Initial revision by user avatar trichoplax‭ · 2023-06-24T23:38:23Z (over 1 year ago)
For most purposes, the easiest approach is probably Markdown tables, as described in [Wicket's answer](https://software.codidact.com/posts/288660/288698#answer-288698).

If you have requirements that Markdown tables do not support, such as merged cells, you can resort to HTML tables, which can be included directly in the raw text of a post.

For example, raw text like this:
```html
<table>
    <tr>
        <td><b>header 1</b></td>
        <td colspan="2"><b>header 2 (wide)</b></td>
        <td><b>header 3</b></td>
    </tr>
    <tr>
        <td>data A</td>
        <td colspan="2" rowspan="2">data B (wide tall)</td>
        <td>data C</td>
    </tr>
    <tr>
        <td rowspan="2">data D (tall)</td>
        <td rowspan="1">data E</td>
    </tr>
    <tr>
        <td>data F</td>
        <td>data G</td>
        <td>data H</td>
    </tr>
</table>
```

Is rendered like this:
<table>
    <tr>
        <td><b>header 1</b></td>
        <td colspan="2"><b>header 2 (wide)</b></td>
        <td><b>header 3</b></td>
    </tr>
    <tr>
        <td>data A</td>
        <td colspan="2" rowspan="2">data B (wide tall)</td>
        <td>data C</td>
    </tr>
    <tr>
        <td rowspan="2">data D (tall)</td>
        <td rowspan="1">data E</td>
    </tr>
    <tr>
        <td>data F</td>
        <td>data G</td>
        <td>data H</td>
    </tr>
</table>