HTML CSS Reference/HTML Attributes Reference/scope — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 09:21, 26 мая 2010

"scope" Example

    
<HTML>
<head><Title>Example For scope</Title></head>
<BODY>
<table id="myT2" rules="" border="1">
   <tr>
      <th scope="colgroup">Header 1</th>
      <th scope="colgroup">Header 2</th>
      <th scope="colgroup">Header 3</th>
      <th scope="colgroup">Header 4</th>
      <th scope="colgroup">Header 5</th>
      <th scope="colgroup">Header 6</th>
   </tr>
   <tr>
      <th scope="rowgroup">Row 1</th>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
      <td scope="col">Cell info 1</td>
      <td>Cell</td>
   </tr>
   <tr>
      <th scope="rowgroup">Row 2</th>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
   </tr>
   <tr>
      <th scope="rowgroup">Row 3</th>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
   </tr>
   <tr>
      <th scope="rowgroup">Row 4</th>
      <td scope="row">Cell info 2</td>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
      <td>Cell</td>
    </tr>
</table>
</BODY>
</HTML>



scope is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<td>                            <th>                          |
+----------------+--------------------------------------------------------------+



"scope" Syntax and Note

Note:
    
This attribute specifies the group of cells to which header information 
on the current cell refers. 
If its value is row or rowgroup, the cell provides header information for 
the current row. 
If its value is col or colgroup, the cell provides header information for 
the current column. 
    
Syntax:
    
<element scope="value"> . . . </element>