Shine Tutorial    
  shinetutorialtopsideimage
HOME DOS OS C,C++ HTML CSS XML JAVA ASP PHP SQL OFFICE MULTIMEDIA MORE... CERTIFICATION ABOUT
 
S T ADVT
TUTORIALS

HTML 5 Reference

HTML 5 Tags
HTML 5 Attributes
HTML 5 Events

HTML 5 Tags

<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<datalist>
<dd>
<del>
<details>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1> - <h6>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<keygen>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<tt>
<u>
<ul>
<var>
<video>
<xmp>


 

HTML 5 <colgroup> Tag


Example

<table width="100%" border="1">
  <colgroup span="2" style="background:red"></colgroup>
  <tr>
    <th>ISBN</th>
    <th>Title</th>
    <th>Price</th>
  </tr>
  <tr>
    <td>3476896</td>
    <td>My first HTML</td>
    <td>$53</td>
  </tr>
</table>

View it »

Definition and Usage

The <colgroup> tag is used to group columns in a table for formatting.

The <colgroup> tag is useful for applying styles to entire columns, instead of repeating the styles for each cell, for each row.

The <colgroup> tag can only be used inside a table element.


Differences Between HTML 4.01 and HTML 5

Most of the attributes from 4.01 are not supported in HTML 5.


Tips and Notes

Note: The colgroup element can only contain col elements.

Note: The colgroup element does not create columns. To create columns, you must specify td elements within a tr element.

Tip: Use the colgroup element if you want to specify the same attribute values to a group of columns.

Tip: Use the col element when you want to specify different attribute values to more than one table column.

Attributes

Attribute Value Description
align left
right
center
justify
char
Not supported in HTML 5
char character Not supported in HTML 5
charoff number Not supported in HTML 5
span number Defines the number of columns the column group should span
valign top
middle
bottom
baseline
Not supported in HTML 5
width %
pixels
relative_length
Not supported in HTML 5

Standard Attributes

The <a> tag also supports the Standard Attributes in HTML 5.


Event Attributes

The <a> tag also supports the Event Attributes in HTML 5.