/    Sign up×
Community /Pin to ProfileBookmark

Valid HTML 4.01 Transitional – "Table: COLS" Attribute

I need to use the “table cols” attribute for my main page ([URL]http://www.christianityfortoday.com/Delta_Troopers/[/URL]). But when i try to validate it (through the link in the footer), it says that the “cols” attribute doesn’t exist. I tried taking it out, but then the columns are all the same size.

to post a comment
HTML

11 Comments(s)

Copy linkTweet thisAlerts:
@kiwibritMay 28.2006 — <i>
</i>&lt;colgroup span="6"&gt;
&lt;col width="16%" align="left" valign="top"&gt;
&lt;col width="16%" align="left" valign="top"&gt;
&lt;col width="16%" align="left" valign="top"&gt;
&lt;col width="16%" align="left" valign="top"&gt;
&lt;col width="16%" align="left" valign="top"&gt;
&lt;col width="20%" align="left" valign="top"&gt;
&lt;/colgroup&gt;

Choose the widths you want.

I an not clear why you have a valid 4.01 badge on the page, when at present your page does not validate.
Copy linkTweet thisAlerts:
@rcracingfan24authorMay 28.2006 — <i>
</i>&lt;COLGROUP span="6"&gt;
&lt;COL width="16%" align="left" valign="top"&gt;
&lt;COL width="16%" align="left" valign="top"&gt;
&lt;COL width="16%" align="left" valign="top"&gt;
&lt;COL width="16%" align="left" valign="top"&gt;
&lt;COL width="16%" align="left" valign="top"&gt;
&lt;COL width="20%" align="left" valign="top"&gt;
&lt;/COLGROUP&gt;

Choose the widths you want.

I an not clear why you have a valid 4.01 badge on the page, when at present your page does not validate.[/QUOTE]


The site isn't really public yet, and when it does go public, I want it to be valid. That's why. I'll try that code later, I have to complete a project first (I hate school...).
Copy linkTweet thisAlerts:
@kiwibritMay 28.2006 — The site isn't really public yet, and when it does go public, I want it to be valid. That's why. I'll try that code later, I have to complete a project first (I hate school...).[/QUOTE]

OK. You can see I have now edited COLGROUP and COL to lower case. Better to use that, makes it easier if you ever wish to switch to XHTML.
Copy linkTweet thisAlerts:
@rcracingfan24authorMay 28.2006 — Couldn't I just do:

[CODE]
<table>
<tr>
<td width="16%></td>
<td width="68%"></td>
<td width="16%"></td>
</tr>
</table>
[/CODE]


I've never used "colgroup" before. And I want three columns, not six.

My current code now is:

<i>
</i>&lt;table width="825" cols="6"&gt;
&lt;tr&gt;
&lt;td colspan="1" align="left" valign="top" class="leftcol"&gt;
Left Menu
&lt;/td&gt;
&lt;td colspan="4" align="center" valign="top" class="content"&gt;
Main Content
&lt;/td&gt;
&lt;td colspan="1" align="right" valign="top" class="rightcol"&gt;
Right Menu
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
Copy linkTweet thisAlerts:
@kiwibritMay 28.2006 — ........

I've never used "colgroup" before.[/QUOTE]


I suggest you learn [url=http://www.w3.org/TR/html4/struct/tables.html#h-11.2.4] HTML as defined by W3C[/url].

And I want three columns, not six.[/QUOTE]

The example is generic. You can have as many cloumns as you want.

My current code now is:

<i>
</i>&lt;table width="825" cols="6"&gt;
&lt;tr&gt;
&lt;td colspan="1" align="left" valign="top" class="leftcol"&gt;
Left Menu
&lt;/td&gt;
&lt;td colspan="4" align="center" valign="top" class="content"&gt;
Main Content
&lt;/td&gt;
&lt;td colspan="1" align="right" valign="top" class="rightcol"&gt;
Right Menu
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
[/QUOTE]


You are still using COLS - which is a proprietary attribute.

It's 11pm here in the UK. Goodnight ?
Copy linkTweet thisAlerts:
@rcracingfan24authorMay 29.2006 — I suggest you learn [url=http://www.w3.org/TR/html4/struct/tables.html#h-11.2.4] HTML as defined by W3C[/url].



The example is generic. You can have as many cloumns as you want.



You are still using COLS - which is a proprietary attribute.

It's 11pm here in the UK. Goodnight ?[/QUOTE]


I meant that's the effect I want to have with the table. Good night.
Copy linkTweet thisAlerts:
@JPnycMay 29.2006 — I don't understand why "cols" is even necessary. You define how many columns there are by the number of cells per row, then just set the widths of the cells to govern the column widths.
Copy linkTweet thisAlerts:
@rcracingfan24authorMay 29.2006 — I don't understand why "cols" is even necessary. You define how many columns there are by the number of cells per row, then just set the widths of the cells to govern the column widths.[/QUOTE]

Good point. Ok, it works now, I just did:
&lt;td width="17%"&gt;,
&lt;td width="66%"&gt;,
&amp; &lt;td width="17%"&gt;.


Thanks everyone. ?
Copy linkTweet thisAlerts:
@kiwibritMay 29.2006 — I don't understand why "cols" is even necessary. You define how many columns there are by the number of cells per row, then just set the widths of the cells to govern the column widths.[/QUOTE]
Well,
<i>
</i>&lt;td width="17%"&gt;Left Menu &lt;/td&gt;
&lt;td width="66%"&gt;Main Content &lt;/td&gt;
&lt;td width="17%"&gt;Right Menu&lt;/td&gt;

validates in transitional code, but not strict. Why not learn good habits from the start?
Copy linkTweet thisAlerts:
@rcracingfan24authorMay 29.2006 — 'Cuz I'm too lazy. :p
Copy linkTweet thisAlerts:
@felgallMay 29.2006 — Things that validate as transitional but not strict are those things that future browsers are not required to support any more. This is the transition period that allows people time to remove such code from their pages before support for it is dropped. That is why the document type is called transitional. Adding code that only validates as transitional is just creating more pages that you will have to convert later so it is something that you definitely should not do if you are lazy or don't have heaps of free time to redo your pages.
×

Success!

Help @rcracingfan24 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 5.2,
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,
)...