473,549 Members | 2,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

col vs colgroup

What is the practical difference between these elements? They seem to
accomplish the same thing. Is there an example of how one might be
advantageous over the other?
Jun 27 '08 #1
1 6863
yaugin wrote:
What is the practical difference between these elements? They seem to
accomplish the same thing. Is there an example of how one might be
advantageous over the other?
I'd say the explanation of COL and COLGROUP in the specification
(http://www.w3.org/TR/html401/struct/....html#h-11.2.4) does a pretty
good job of explaining this and giving examples.

The short summary: COL lets you apply certain attributes to columns;
COLGROUP lets you group columns together structurally (the columns have
a meaningful relationship to each other). COL is purely for styling;
COLGROUP has a relational meaning in the table.

--
David
Stardate 8350.7
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2390
by: Brian | last post by:
I have a simple catalogue table, and wanted to suggest a width for each column. To do this, I added a colgroup with col elements. <COLGROUP> <COL CLASS="cattitle"> <COL CLASS="material"> <COL CLASS="purchase"> </COLGROUP> But I'm wondering: couldn't I just put those classes in the th
1
9513
by: Daniel Haude | last post by:
Me again! This time I'd like to prevent an entire column of a table to have no word-wrapping. So I defined this class in the style sheet: ..nobr { white-space: nowrap; } When I define table cells like this: <td class="nobr"> everything works
1
2287
by: F. Da Costa | last post by:
Hi, After trying to get <colgroup><col> working properly on Gecko (moz & firebird) i'm starting to worry a tad about Gecko's ability to use this obvious standard (even IE 5+ works with it). Usning Moz 1.6a and Firebird 0.7+. Tried to figure it out via Moz buglist but it seems to have been recognized already a couple of years(!) ago. Could not...
2
7166
by: Christopher Benson-Manica | last post by:
I have the following markup and script: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>test</title> <script type="text/javascript"> function foo() { document.getElementById( 'foo' ).style.display='none'; }
1
6839
by: Rob Meade | last post by:
Hi all, I recently read a book regarding improving the performance of web pages loading, one of the suggestions was to add <colgroup> and the relevant <col> tags with information such as cell widths and so on. Having understood how this works and what it can do I was keen to apply it this morning to a .net application - my problem is that...
33
18624
by: David Stone | last post by:
Been trying to specify text alignment within specific columns in an html 4 strict page. According to the w3c specs, <TABLE border="1"> <COLGROUP> <COL> <COL align="char" char="."> </COLGROUP>
4
3204
by: TS | last post by:
I am losing my colgroup html element of a table that i toggle back and forth of being visible=true/false. is there any workaround since the rendered html doesn't contain it even though it has not been explicitely been made invisible? note also that even when the table is made visible=true, colgroup still doesn't show up
36
5078
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT do so, since this is not part of the specification. How then to you apply styles to entire columns? Surely you don't have to write <td...
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6041
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.