/    Sign up×
Community /Pin to ProfileBookmark

Hi,

Why both table showing same in display ?
Can you spot the difference in coding between the following two ?
They display exactly the same in browser.
Note the <tr></tr> on both.
I sticking to the last one.
Seems like <th> is <tr> but highlights the **text to bold**.
Yes ? Can you confirm this to be the case ?

1.

[code]
<table>
<thead>
<th>ID</th>
<th>EMAIL</th>
</thead>
<tfoot>
<th>ID</th>
<th>EMAIL</th>
</tfoot>
<tbody>
<tr>
<td>Muhammad</td>
<td>Ali</td>
</tr>
<tr>
<td>Jackie</td>
<td>Chan</td>
</tr>
</tbody>
</table>
[/code]

2.

[code]
<table>
<thead>
<tr>
<th>ID</th>
<th>EMAIL</th>
</tr>
</thead>
<tfoot>
<tr>
<th>ID</th>
<th>EMAIL</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Muhammad</td>
<td>Ali</td>
</tr>
<tr>
<td>Jackie</td>
<td>Chan</td>
</tr>
</tbody>
</table>
[/code]

**CORRECTION: According to tutorials, I should stick to the first one!**

to post a comment
HTML

29 Comments(s)

Copy linkTweet thisAlerts:
@novice2022authorJun 21.2022 — **CORRECTION:**

Seems like <th> is <td> but highlights the text to bold.

Yes ? Can you confirm this ?
Copy linkTweet thisAlerts:
@sibertJun 21.2022 — > @novice2022#1644776 Can you confirm this ?

https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_intro
Copy linkTweet thisAlerts:
@NogDogJun 21.2022 — The important thing to understand what it _means_ as far as the text content goes. You can always make it look the way want it to look via CSS. I.e., don't use it on a table cell simply because you want the text to be bold in that cell; but use it because you want that cell to be a **T**able **H**eading cell of some sort, then make it look the way you want (if not the default look the browser displays) via your CSS.
Copy linkTweet thisAlerts:
@novice2022authorJun 22.2022 — @NogDog#1644778

Yes. I know.
Copy linkTweet thisAlerts:
@novice2022authorJun 22.2022 — @sibert#1644777

Thks.But tht css is too hrd for me t the moment.

Right now, revising html table. Seeing wht html5 deprected or introduced.

I was looking these when I opened this thread.

https://htmlreference.io/tables/

https://www.tutorialspoint.com/html/html_tables.htm

Pure html. No css.

However, checking your css recommendation code out.
Copy linkTweet thisAlerts:
@cootheadJun 22.2022 — > @novice2022#1644793

> Yes. I know.


Are you sure??? 😧

[i]coothead[/i]
Copy linkTweet thisAlerts:
@novice2022authorJun 22.2022 — @coothead#1644795

Yes.

"**don't use it on a table cell simply because you want the text to be bold in that cell; but use it because you want that cell to be a Table Heading cell of some sort,**"

Look, experimented so far ...
<i>
</i>&lt;table border="1" cellspacing="5" cellpadding="20"&gt;
&lt;thead&gt;
&lt;th colspan="4"&gt;ID&lt;/th&gt;&lt;th colspan="2"&gt;EMAIL&lt;/th&gt;&lt;th&gt;SURNME&lt;/th&gt;
&lt;/thead&gt;
&lt;tfoot&gt;
&lt;th rowspan="2" colspan="4"&gt;ID&lt;/th&gt;&lt;th&gt;EMAIL&lt;/th&gt;&lt;th&gt;SURNME&lt;/th&gt;
&lt;/tfoot&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td rowspan="2" colspan="4"&gt;Muhammad&lt;/td&gt;&lt;td&gt;Ali&lt;/td&gt;&lt;td&gt;Hussein&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;Jackie&lt;/td&gt;&lt;td&gt;Chan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mr&lt;/td&gt;&lt;td&gt;Likot&lt;/td&gt;&lt;td&gt;Ali&lt;/td&gt;&lt;td&gt;Ho&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Junky&lt;/td&gt;&lt;td&gt;Man&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

Copy linkTweet thisAlerts:
@novice2022authorJun 22.2022 — Can someone confirm these re invlid s I see I get no chges with ot without them ...
<i>
</i>&lt;!-- FAIL:
&lt;th rowspan="4"&gt;
&lt;tr rowspan="2" colspan="2"&gt;
--&gt;
Copy linkTweet thisAlerts:
@ginerjmJun 22.2022 — you don't need any colspan in a th cell. The html will size the heading cells to match the td cells. Doh.
Copy linkTweet thisAlerts:
@novice2022authorJun 23.2022 — @ginerjm#1644804

You wrong man!

I want to enlarge the **th** cells to twice the size of a cell.

Test following code on your localhost and see for yourself as glancing over the code is making you confused.
<i>
</i>&lt;!DOCTYPE html&gt;
&lt;head&gt;
&lt;title&gt;Table&lt;/title&gt;
&lt;style&gt;

th:hover {background-color: black; color: gold;}
tr:hover {background-color: silver; color: white;}

#gt0,#gt1,#gt2:hover {background-color: orange; color: red;}

&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;table border="20" width="100%" cellspacing="5" cellpadding="20" color="red" bgcolor="orange"&gt;
&lt;caption&gt;Caption&lt;/caption&gt;
&lt;colgroup&gt;
&lt;col span="3" style="background-color:white; color:green; font-family:courier; font-size:50%;"&gt;
&lt;col span="3" style="background-color:black; color:blue; font-family:verdana; font-size:40%;"&gt;
&lt;col span="3" style="color:red; font-family:arial; font-size:10%;"&gt;
&lt;/colgroup&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th colspan="3"&gt;GOOD&lt;/th&gt;&lt;th colspan="3"&gt;BAD&lt;/th&gt;&lt;th colspan="3"&gt;NEUTRAL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Title&lt;/td&gt;&lt;td&gt;FIRST NAME&lt;/td&gt;&lt;td&gt;SURNAME&lt;/td&gt;&lt;td&gt;Title&lt;/td&gt;&lt;td&gt;FIRST NAME&lt;/td&gt;&lt;td&gt;SURNAME&lt;/td&gt;&lt;td&gt;Title&lt;/td&gt;&lt;td&gt;FIRST NAME&lt;/td&gt;&lt;td&gt;SURNAME&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td id="gt0"&gt;Mr&lt;/td&gt;&lt;td id="gf0"&gt;Muhammad&lt;/td&gt;&lt;td id="gs0"&gt;Ali&lt;/td&gt;&lt;td id="bt0"&gt;Mr&lt;/td&gt;&lt;td id="bf0"&gt;Adolph&lt;/td&gt;&lt;td id="bs0"&gt;Hitler&lt;/td&gt;&lt;td id="nt0"&gt;Mr&lt;/td&gt;&lt;td id="nf0"&gt;Mohandas&lt;/td&gt;&lt;td id="ns0"&gt;Ghandi&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td id="gt1"&gt;Mr&lt;/td&gt;&lt;td id="gf1"&gt;Mike&lt;/td&gt;&lt;td id="gs1"&gt;Tyson&lt;/td&gt;&lt;td id="bt1"&gt;Mr&lt;/td&gt;&lt;td id="bf1"&gt;Winston&lt;/td&gt;&lt;td id="bs1"&gt;Churchill&lt;/td&gt;&lt;td id="nt1"&gt;Mr&lt;/td&gt;&lt;td id="nf1"&gt;Crocodile&lt;/td&gt;&lt;td id="ns1"&gt;Dundee&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td id="gt2"&gt;Mr&lt;/td&gt;&lt;td id="gf2"&gt;Malcolm&lt;/td&gt;&lt;td id="gs2"&gt;X&lt;/td&gt;&lt;td id="bt2"&gt;Mr&lt;/td&gt;&lt;td id="bf2"&gt;Joseph&lt;/td&gt;&lt;td id="bs2"&gt;Stalin&lt;/td&gt;&lt;td id="nt2"&gt;Mr&lt;/td&gt;&lt;td id="nf2"&gt;Napolean&lt;/td&gt;&lt;td id="ns2"&gt;Bonaparte&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr&gt;
&lt;td colspan="3"&gt;GOOD&lt;/td&gt;&lt;td colspan="3"&gt;BAD&lt;/td&gt;&lt;td colspan="3"&gt;NEUTRAL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

&lt;/body&gt;
&lt;/html&gt;


However, my issues are not resolved:

https://forum.webdeveloper.com/d/400067-why-colgroup-style-has-no-effect/3

https://forum.webdeveloper.com/d/400062-how-to-change-text-colour-in-a-table-via-colgroup/10
Copy linkTweet thisAlerts:
@arel3Jun 24.2022 — In light of the information on [this](https://www.w3schools.com/html/html_tables.asp) page that shares the standards of what all the table element tags are and _mean_ I always thought of them like this:

&lt;tr&gt; opens a table _row_. We need this first otherwise we won't have a row to put columns in to place cells in.

&lt;th&gt; is header or horizontal. I personally don't use it often other than for the very first horizontal row and cells in a table when I use a table. When I began learning HTML in 1993 I don't remember &lt;th&gt; existing then. I could be wrong and I just didn't use it. I used tables often when I was first learning, and then also used them a heck of a lot building themes for php-nuke versions, I typically only ever used &lt;tr&gt; for the rows and &lt;td&gt; for the cells in a row. If I wanted something to be bold I either used the &lt;font&gt; element (before it was discontinued) or I gave what I wanted to be bold a CSS class that I also used wherever else I wanted text to be formatted the same way. I did the same thing instead of using &lt;h1&gt;s.

Good? Bad? Indifferent? Depends on who you ask and/or who replies, where you look and find an answer to a question that starts with 'how should I...'.

We all develop habits and our own style of coding. There are standards, of course. In my opinion as long as the code works and doesn't cause an error there isn't anything wrong with _how_ the code is written. No 2 people write code the exact same way with the exact same spacing or amount of tab-spaces. Some squash all the code together as tight as they can, some use separate lines to make their code more organized, easier to read and find things in without using a search feature.

&lt;td&gt; I always thought of as table "down" to help me remember that it created a cell. I think of &lt;tr&gt; creating a horizontal line starting a row and &lt;td&gt; expanding that line downward. It's just the way I personally think of it, as I said, to help myself visualize the picture of what I'm creating with text in my head without seeing it in a browser.
Copy linkTweet thisAlerts:
@novice2022authorJun 24.2022 — @arel3#1644868

Thanks. I used to scratch my head why they did not have <tc> instead of <td>.

Many times I learnt about tables and many times forgotten over the yrs.

Now, I should be able to not forget what <td> stands for (col) by remembering d stands for "down" (your personal definition). Hence, <td> is for building or dealing with col. That helped.

Yeah, I first learnt html back in 1998. And, I hated tables back then.Found no use for them and I avoided learning html code about them like you avoid Corona Virus. But now, I like them and trying to build a good unique type of table.

I was introduced to internet in 1997 through mail order junks I used to receive. I first got online in 1998. Now html5 is much complicated like programming langs.
Copy linkTweet thisAlerts:
@novice2022authorJun 24.2022 — Hi,

Can <tr> and <th>,<thead>,<tfoot> and <td> have these:

name=

id=

I learnt <td> cannot have:

name=

but can have:

id=

Learnt from here:

https://validator.w3.org/nu/#textarea
Copy linkTweet thisAlerts:
@SempervivumJun 24.2022 — The reason is that the name attribute specifies the key where the value of, e. g. an input, is available in the GET or POST params after a form has been submitted. Therefore a name attribute for a `td` would not make sense.
Copy linkTweet thisAlerts:
@novice2022authorJun 24.2022 — @Sempervivum#1644874

Ah! Well done in your explanation! Things are clear now. I could not understand the difference between the name & id.
Copy linkTweet thisAlerts:
@novice2022authorJun 24.2022 — Hi,

On this, I see now borders for the table, th, tr. Why ?
<i>
</i>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;

&lt;meta charset="utf-8"&gt;

&lt;title&gt;Test&lt;/title&gt;

&lt;link rel="stylesheet" href="screen.css" media="screen"&gt;

&lt;style media="screen"&gt;

&lt;!--
Design Table Border.
--&gt;
table, th, td {
border: 1px solid;
}

&lt;!--
&lt;table border="20" width="100%" cellspacing="5" cellpadding="20" color="red" bgcolor="orange"&gt;
--&gt;

&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;table id="chars"&gt;
&lt;caption&gt;Caption&lt;/caption&gt;

&lt;thead&gt;
&lt;tr&gt;
&lt;th colspan="3"&gt;GOOD&lt;/th&gt;&lt;th colspan="3"&gt;BAD&lt;/th&gt;&lt;th colspan="3"&gt;NEUTRAL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Title&lt;/td&gt;&lt;td&gt;FIRST NAME&lt;/td&gt;&lt;td&gt;SURNAME&lt;/td&gt;&lt;td&gt;Title&lt;/td&gt;&lt;td&gt;FIRST NAME&lt;/td&gt;&lt;td&gt;SURNAME&lt;/td&gt;&lt;td&gt;Title&lt;/td&gt;&lt;td&gt;FIRST NAME&lt;/td&gt;&lt;td&gt;SURNAME&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td id="gt0"&gt;Mr&lt;/td&gt;&lt;td id="gf0"&gt;Muhammad&lt;/td&gt;&lt;td id="gs0"&gt;Ali&lt;/td&gt;&lt;td id="bt0"&gt;Mr&lt;/td&gt;&lt;td id="bf0"&gt;Adolph&lt;/td&gt;&lt;td id="bs0"&gt;Hitler&lt;/td&gt;&lt;td id="nt0"&gt;Mr&lt;/td&gt;&lt;td id="nf0"&gt;Mohandas&lt;/td&gt;&lt;td id="ns0"&gt;Ghandi&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td id="gt1"&gt;Mr&lt;/td&gt;&lt;td id="gf1"&gt;Mike&lt;/td&gt;&lt;td id="gs1"&gt;Tyson&lt;/td&gt;&lt;td id="bt1"&gt;Mr&lt;/td&gt;&lt;td id="bf1"&gt;Winston&lt;/td&gt;&lt;td id="bs1"&gt;Churchill&lt;/td&gt;&lt;td id="nt1"&gt;Mr&lt;/td&gt;&lt;td id="nf1"&gt;Crocodile&lt;/td&gt;&lt;td id="ns1"&gt;Dundee&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td id="gt2"&gt;Mr&lt;/td&gt;&lt;td id="gf2"&gt;Malcolm&lt;/td&gt;&lt;td id="gs2"&gt;X&lt;/td&gt;&lt;td id="bt2"&gt;Mr&lt;/td&gt;&lt;td id="bf2"&gt;Joseph&lt;/td&gt;&lt;td id="bs2"&gt;Stalin&lt;/td&gt;&lt;td id="nt2"&gt;Mr&lt;/td&gt;&lt;td id="nf2"&gt;Napolean&lt;/td&gt;&lt;td id="ns2"&gt;Bonaparte&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr&gt;
&lt;td colspan="3"&gt;GOOD&lt;/td&gt;&lt;td colspan="3"&gt;BAD&lt;/td&gt;&lt;td colspan="3"&gt;NEUTRAL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

&lt;br&gt;

&lt;/body&gt;
&lt;/html&gt;


File is saved as .html. Have to save as .css ?

Should see borders like this:

https://www.w3schools.com/css/tryit.asp?filename=trycss_table_border

EDIT:

Nope. Saving as .css, the browser does not render the code. I see plain text of code in the browser.

EDIT 2:

I switched the comment to this:

<!--Design Table Border-->

And working now.
Copy linkTweet thisAlerts:
@novice2022authorJun 24.2022 — I switched the comment to this:

<!--Design Table Border-->

And working now.
Copy linkTweet thisAlerts:
@SempervivumJun 24.2022 — This `&lt;-- this is a comment --&gt;</C> is for HTML, in CSS use this instead:<br/>
<C>
/* this is a comment */`
Copy linkTweet thisAlerts:
@novice2022authorJul 05.2022 — @Sempervivum#1644883

For css, we use the php multi-line comment ?
Copy linkTweet thisAlerts:
@SempervivumJul 05.2022 — Yes, in CSS the comment can span multiple lines too:
``<i>
</i>/* comment line 1
comment line 2 */<i>
</i>
``
Copy linkTweet thisAlerts:
@novice2022authorJul 05.2022 — @Sempervivum#1645183

Tutorials show something like this about the footer ...
<i>
</i>&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
table, th, td {
border: 1px solid black;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;The thead, tbody, and tfoot elements&lt;/h1&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Month&lt;/th&gt;
&lt;th&gt;Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;January&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;February&lt;/td&gt;
&lt;td&gt;$80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr&gt;
&lt;td&gt;Sum&lt;/td&gt;
&lt;td&gt;$180&lt;/td&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

&lt;/body&gt;
&lt;/html&gt;


I am switching the <td> to <th> instead on the footer. Works in browser as expected but technically is it ok to have <th> on the <tfooter> since all tutorials show <th> on the <thead>. I got it in both <thead> & <tfoot>. Is that technically sound ?

Look ...
<i>
</i>&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
table, th, td {
border: 1px solid black;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;The thead, tbody, and tfoot elements&lt;/h1&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Month&lt;/th&gt;
&lt;th&gt;Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;January&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;February&lt;/td&gt;
&lt;td&gt;$80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr&gt;
&lt;th&gt;Sum&lt;/th&gt;
&lt;th&gt;$180&lt;/th&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@novice2022authorJul 05.2022 — @Sempervivum

On this one, I do not have <th> on both <thead> & <tfoot> like previous post. But only on <tfoot>.

Is that technically correct too if it works in the browser as expected ?

Notice <thead> as no <th> there since <thead> no exists.

And notice <tfoot>as <th> present.

Look ....

<i>
</i>&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
table, th, td {
border: 1px solid black;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;The thead, tbody, and tfoot elements&lt;/h1&gt;

&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;January&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;February&lt;/td&gt;
&lt;td&gt;$80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr&gt;
&lt;th&gt;Sum&lt;/th&gt;
&lt;th&gt;$180&lt;/th&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

&lt;/body&gt;
&lt;/html&gt;

Or must <thead> exist in a table of <tfoot> exists ?
Copy linkTweet thisAlerts:
@novice2022authorJul 05.2022 — @Sempervivum

On this one, can I have both <thead> & <tfoot> but <thead> got <td> and not <th> while <tfoot> got the <th> instead ?

If you analyse carefully, these 3 posts are not the same but similar questions. I need answers as tutorials are not giving them.

<i>
</i>&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
table, th, td {
border: 1px solid black;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;The thead, tbody, and tfoot elements&lt;/h1&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td&gt;Month&lt;/td&gt;
&lt;td&gt;Savings&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;January&lt;/td&gt;
&lt;td&gt;$100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;February&lt;/td&gt;
&lt;td&gt;$80&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr&gt;
&lt;th&gt;Sum&lt;/th&gt;
&lt;th&gt;$180&lt;/th&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

&lt;/body&gt;
&lt;/html&gt;


https://www.w3schools.com/tags/tag_tfoot.asp
Copy linkTweet thisAlerts:
@SempervivumJul 05.2022 — I don't know from scratch about the facts regarding `td</C> vs. <C>th</C> in <C>thead</C> and <C>tfoot` and recommend to ask the validator.

However regarding this:
>Is that technically correct too if it works in the browser as expected ?

I definitely know: The browser are **very** tolerant concerning code being invalid. One can even say that they are trying to make a reasonable display from code that is a mess.
Copy linkTweet thisAlerts:
@novice2022authorJul 06.2022 — @Sempervivum#1645190

Mmm.

Ok. Let's see if I can sort this puzzle with your help. No luck lastnight or tonight.

Can you see this in your browser ?
<i>
</i>&lt;h1&gt;Example 2: The thead, tbody, and tfoot elements&lt;/h1&gt;

&lt;table&gt;
&lt;caption&gt;Caption&lt;/caption&gt;
&lt;thead&gt;
&lt;tr class="header" id="header2" style="background-color:black; color:white;"&gt;
&lt;th&gt;Id&lt;/th&gt;
&lt;th&gt;Url&lt;/th&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="datas" id="data1" style="background-color:black; color:blue;"&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;sempervivum.com&lt;/td&gt;
&lt;td&gt;[email protected]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="datas" id="data2" style="background-color:black; color:blue;"&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;nogdog.com&lt;/td&gt;
&lt;td&gt;[email protected]&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;tfoot&gt;
&lt;tr class="sponsor" id="heading" rowspan="2" colspan="2" style="background-color:gold;"&gt;
&lt;th&gt;Sponsor Link&lt;/th&gt;
&lt;/tr&gt;
&lt;tr class="sponsor" id="link" rowspan="2" colspan="2" style="background-color:gold;"&gt;
&lt;th&gt;http://novice2022.com&lt;/th&gt;
&lt;/tr&gt;
&lt;/tfoot&gt;
&lt;/table&gt;

It is nearly working fine as expected. Do run it on your browser to get an idea what I want done.

Now, do you see the footer's row & col span are 2 usual rows & 2 usual columns ?

In that case, the footer should be twice as big in length & width. But not.

Why ?
Copy linkTweet thisAlerts:
@NogDogJul 06.2022 — rowspan is not a size specification. It means the cell is to actually appear in 2 (or more) rows as a single, sort of overlapping cell, so it's height will be determined my the combined heights of the rows being overlapped. As an example, see https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_rowspan
Copy linkTweet thisAlerts:
@novice2022authorJul 07.2022 — @NogDog#1645215

I did checkout that tutorial before I opened threads in this forum. Still thanks for the link.

Let me see if I can explain to you what I want done.

Here ...

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_rowspan

been fiddling with that link you gave. Experimenting with different codes for half hr now and have come to the conclusion that colspan & rowspan won't do what I want. And so, I got to get you to suggest me the right table html to do what I want. So, which one is it that I need to look into ?

Look at this code in your browser ....
<i>
</i>&lt;h1&gt;Expand Russian Footer To Takeover Whole Ukraine&lt;/h1&gt;

&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;Northwest Europe Border&lt;/th&gt;
&lt;th&gt;North Europe Border&lt;/th&gt;
&lt;th&gt;North East Europe Border&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EU Northwest&lt;/td&gt;
&lt;td&gt;EU North&lt;/td&gt;
&lt;td&gt;EU Northeast&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;North Ukraine&lt;/th&gt;
&lt;th rowspan="2" colspan="2"&gt;Russia&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;South Ukraine&lt;/th&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;


Can you see the Russian cell ? That is not really a footer. But I need to make it a footer. A footer, who's cell is twice in size rowwise and columnwise than other cells.

See "North Ukraine" & "South Ukraine" cells ?

Now imagine, the Russian cell expanded and tookover those 2 Ukraine cells so they no longer exist. So 3 cells now become 1 cell. How to do that ? I guess rowspan & colspan won;t do here.

Remember, the Russian cell must be at the bottom (footer, like a banner ad) and no cell must be underneath it or besides it. And it's cell must be 2.5 times as big that of any other cell in terms of row and column. Three columns in size and two rows in size compared to the other cells.
Copy linkTweet thisAlerts:
@NogDogJul 07.2022 — @novice2022#1645247

Then apply a style to the &lt;tr&gt; element (or its child th or td elements) -- no need to use rowspan for visual styling only. Again: HTML is for semantic meaning, CSS is for visual appearance/styling.
Copy linkTweet thisAlerts:
@novice2022authorJul 07.2022 — @NogDog#1645252

???

Apply style to expand a cell to takeover two cells on it's left ? Confused.

Or apply style so the two cells (Ukrain) do not appear in the browser but the Russian cell appear instead as big as I want ? What styling tags should I be looking into to achieve all that ? Still confused. Scratching my head.

Css border style ? I get the feeling, the css code would be lengthy to achieve that. What's your hunch ?

Or would the grid html stuff work here ?

While I wait for your answer, let me check the grid, which I forgot to do few hrs ago. But do give an answer. I need to take shortcuts with as min code as possible. Shortest code.
×

Success!

Help @novice2022 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...