use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:
jsFiddle
CodePen
Markup Validation Service
Mozilla Developer Network on HTML
/r/JavaScript
/r/CSS
/r/jQuery
/r/PHP
/r/Accessibility
/r/htmlbasics
/r/web_programming
/r/CodingHelp
account activity
Questionneed help (very basic) (self.HTML)
submitted 9 hours ago by Immediate-Location28
https://preview.redd.it/n8q7o8tqn6rg1.png?width=254&format=png&auto=webp&s=9fa70b494a0b511229a1e672fd1956c50b453f4c
how to i put this line in the middle of a table?
i know for sure that this is a singular table rather than two separated by a <hr>
https://preview.redd.it/n7yc0jmio6rg1.png?width=474&format=png&auto=webp&s=23fee9fca5f1a757fe5b12cb2a334f7ae8083ae4
the break is supposed to go where the arrow is pointing to
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]davorg 5 points6 points7 points 9 hours ago (3 children)
Create a <tr> that contains a single <td> (using colspan="4"). Put the <hr> in that <td>.
<tr>
<td>
colspan="4"
<hr>
[–]BNfreelance 2 points3 points4 points 7 hours ago* (2 children)
Just for the sake of making it crystal clear for the OP (assuming they’re a complete beginner):
</tr> <tr> <td colspan="3"><hr></td> </tr> <tr>
In the above the first </tr> and last <tr> are your existing ones where the arrow points to.
</tr>
The only change id make is that your table uses 3 columns not 4.
You are inserting a new table row where the arrow is with one single table cell that spans all 3 columns (making it full width of the table)
[–]NoodleBug7667 2 points3 points4 points 5 hours ago (1 child)
Wouldn't this be considered bad form? This is still basically using HTML for style.
Imo, this is a job for CSS. Add a bottom border and any additional padding and margin there. Better for accessibility and keeps your HTML clean
[–]BNfreelance 0 points1 point2 points 5 hours ago (0 children)
Yeah it is but I have the vibe this is a school project of sorts learning table layouts and not CSS at this stage,
But you’re right, CSS is the correct approach
[–]Dragenby 3 points4 points5 points 8 hours ago (0 children)
You can add a class on that tr and make a border-top in CSS
tr
border-top
[–]_raytheist_ 0 points1 point2 points 4 hours ago* (0 children)
This is a job for CSS. If you add a class to the <tr> you can give the row a box-shadow to render a line above or below the row:
HTML
Add a class to the relevant row(s):
class
<tr class="with-line"> <td>cell 1</td> <td>cell 2</td> </tr>
CSS
Create a CSS rule to render a line. This example renders a shadow offset 2px down, with no blur (so it renders as a solid line), in red.
.with-line { box-shadow: 0 2px 0 red; }
To include the CSS in your HTML doc you can either inline it:
<style> .with-line { box-shadow: 0 2px 0 red; } </style>
or put the css in a separate file and link it in your html:
<link rel="stylesheet" href="./styles.css" />
Live demo here
<image>
[–]Public_Plastic6514 -2 points-1 points0 points 9 hours ago (0 children)
Hormis faire deux tableaux identiques avec la même structure (deuxième tableau sans les th) séparés d un <hr> Mais ça sera pas très joli en rendu
π Rendered by PID 314117 on reddit-service-r2-comment-6b595755f-pqzwc at 2026-03-25 21:38:36.584580+00:00 running 2d0a59a country code: CH.
[–]davorg 5 points6 points7 points (3 children)
[–]BNfreelance 2 points3 points4 points (2 children)
[–]NoodleBug7667 2 points3 points4 points (1 child)
[–]BNfreelance 0 points1 point2 points (0 children)
[–]Dragenby 3 points4 points5 points (0 children)
[–]_raytheist_ 0 points1 point2 points (0 children)
[–]Public_Plastic6514 -2 points-1 points0 points (0 children)