should specify widths of columns using the <col> and the <colgroup> elements.
If I understand correctly, I can use col as well as thead th , when I “sort out the spacing/layout”(Styling tables), like col:nth-child(1). However, is it actually better I use <col> including the case like this lesson?
I wouldn’t bother using <col> just for performance reasons unless you have really huge tables that make the page load slow. When having a slow-loading page, chances are that there are bigger problem than the table performance.
I recommend using <col> primarily if you want to style a certain column (background, border, etc.).
Following your advice, especially when I make a small table, I don’t think about performance anymore for now. When I need to style a certain column, I will simply choose <col>. I will think about it after learning how to know the performance.
I apologize for the following confirming, because I think my ability to use English causes this new question. Can I get such information from your message?
When I need to style a certain column, <col> is always or mostly good for the table performance, while it can make other performance bad depends on how to use it. So, when I use a huge table, sometimes I need to be nervous whether I use it or not.
I don’t think <col> can make the performance bad when you use it for colors or borders. The article you linked says that you can improve performance when setting a fixed width for each column. This way the browser doesn’t have to calculate the widths itself.
As I said: You shouldn’t worry about table performance. For example, look at this huge table: https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html. It doesn’t have fixed widths for its columns, but it still loads pretty fast.
I may have used the word style by a wrong way. I’m sorry if I confused you. I haven’t clarified things related to the problem yet, but probably it has been already solved. Either way, you’ve already given me what I need, and your new message is also helpful.