Publish in HTML Tutorial el 23/05/2025 22:38
The <colgroup> element in HTML is used to group columns within a table for styling or formatting purposes. It serves as a container for one or more <col> elements, which define column properties. This element allows you to apply styles or attributes to entire columns without repeating the same rules for each cell.
Key features of <colgroup>:
This example shows how to apply different background colors to table columns.
This example demonstrates how to use the span attribute to apply styles to multiple columns.
This example shows how to set different widths for table columns.
This example uses JavaScript to highlight a column when hovered.
This example uses JavaScript to dynamically change column styles.
The <colgroup> element is supported by all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It has been part of HTML since HTML 3.2.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...