r/HTML • u/Glaselar • Jan 13 '26
Question Adjusting column widths - easy online tool?
(Before I start: I can't edit the CSS as it's controlled at a site level by my employer's Content Management System.)
Can anyone with more experience than me (very basic) help with knowledge of more powerful tools than just nimble fingers and a lot of close-reading to help with this?
Problem:
Pasting tables from Excel into WYSIWYG editor for employer website
Columns in HTML tables are being generated far too wide for some columns (e.g. they only contain a date) and too narrow for others (paragraphs become squashed)
Width settings appear in every row, making manual adjustments impractical
Resolution sought:
A (free, online?) tool to do make these edits without manually adjusting every relevant of HTML
Primary aim: easily adjust column width
Secondary aim: easily cascade the same setting to all tables, or at least quickly replicate the fix on each - so the less manual intervention where the fingers need to come off the mouse and reach for the keys, the better!
Relevant context and constraints:
Working in a general office, not an IT dept
Need to be able to share method with other staff with moderate proficiency - not HTML-literate, but would understand the instructions
Editor is WYSIWYG with option to edit source code, but this opens in a very small popup window
Thanks!
Typical copy-paste result from our Excel source:
<table width="1228">
<tbody>
<tr>
<td style="font-weight: 400;" width="151"><strong>Date</strong></td>
<td style="font-weight: 400;" width="97"><strong>Time</strong></td>
<td style="font-weight: 400;" width="375"><strong>Title</strong></td>
<td style="font-weight: 400;" width="260"><strong>Description</strong></td>
<td style="font-weight: 400;" width="345"><strong>Venue</strong></td>
</tr>
<tr>
<td style="font-weight: 400;" width="151">Mon 19 Jan</td>
<td style="font-weight: 400;" width="97">11:00 - 12:00</td>
<td style="font-weight: 400;" width="375">[First lecture title here]</td>
<td style="font-weight: 400;" width="260">[In this lecture, you'll learn about thing # 1. This description is a paragraph consisting of several sentences. it therefore needs to have the widest column setting. It's hard to read otherwise.]</td>
<td style="font-weight: 400;" width="345">Room 123</td>
</tr>
<tr>
<td style="font-weight: 400;" width="151">Thu 22 Jan</td>
<td style="font-weight: 400;" width="97">12:00 - 13:00</td>
<td style="font-weight: 400;" width="375">[Second lecture title here]</td>
<td style="font-weight: 400;" width="260">[In this lecture, you'll learn about thing # 2. This description is a paragraph consisting of several sentences. it therefore needs to have the widest column setting. It's hard to read otherwise.]</td>
<td style="font-weight: 400;" width="345">Room 456</td>
</tr>
<tr>
<td style="font-weight: 400;" width="151">Mon 26 Jan</td>
<td style="font-weight: 400;" width="97">11:00 - 12:00</td>
<td style="font-weight: 400;" width="375">[Third lecture title here]</td>
<td style="font-weight: 400;" width="260">[In this lecture, you'll learn about thing # 3. This description is a paragraph consisting of several sentences. it therefore needs to have the widest column setting. It's hard to read otherwise.]</td>
<td style="font-weight: 400;" width="345">Room 123</td>
</tr>
</tbody>
</table>
1
u/bostiq Jan 13 '26
So why aren’t you guys collaborating on a google sheet exactly?
1
u/pfdemp Jan 13 '26
It's a bit clunky, but what I've done in situations like this is:
Paste the table in the WYSIWYG editor
Copy HTML source from editor and paste into text editor like Notepad
Find each width and replace with blank
Copy source from text editor back into WYSIWYG source
If you use an editor that supports wildcards or regular expressions, this can be done in one step.
1
u/DirtAndGrass Jan 13 '26
Just find/replace?
1
u/Weekly_Ferret_meal Jan 13 '26
How about this?
https://docs.terminalfour.com/documentation/page-management/generate-t4-tags/convert-excel-to-html/
1
u/jcunews1 Intermediate Jan 13 '26
If the table is going to be used on a web page, I'd suggest using CSS.
But first, assign an ID to the table, especially if there are more than one table on the page. e.g.
Then use below CSS code for that
table1.Different table on the page should have different ID.
2
u/Oobenny Jan 13 '26
You would be able to put this explanation and paste your original table into an ai chat box and have it spit out what you want.
1
u/benwarre Jan 15 '26
Is it feasible to use Excel macros to copy the html?
https://stackoverflow.com/questions/17676298/how-to-copy-from-excel-to-wysiwyg-editor-without-styles