html表格格式的行和列

时间:2014-09-28 22:12:01

标签: html css

我在格式化表时遇到问题。由于某种原因,colspans和rowpans不起作用,单元格只是放入第一行和列可用。我已经创建了列组来指定列的宽度。我在这里有代码:

<table class = “programs” border=“1”
    summary=“Lists the morning programs aired by KPAF from 5:00 a.m. to 12:00p.m.(central time).>
<caption> All Times Central </caption>
<colgroup>
    <col class = “timeColumn” />
    <col class = “wDayColumns” span =“5”/>
    <col class = “wEndColumns” span=“2”/>
</colgroup> 

    <thead>

        <th>Time</th>
        <th>Monday</th>
        <th>Tuesday</th>
        <th>Wednesday</th>
        <th>Thursday</th>
        <th>Friday</th>
        <th>Saturday</th>
        <th>Sunday</th>

    </thead>

    <tbody>

        <tr>
            <th>5:00</th>
            <td colspan =“5” rowspan=“4”>Dawn Air</td>
            <td colspan =“1”>Dawn Air Weekends</td>
            <td colspan =“1”>Sunday Magazine</td>

        </tr>
        <tr>
            <th>5:30</th>

        </tr>
        <tr>
            <th>6:00</th>
            <td col = “1” rowspan = “2”>Weekend Reflections</td>
        </tr>
        <tr>
        <th>6:30</th>
        </tr>
        <tr>
            <th>7:00</th>
            <td colspan=“5”> Local News</td>
            <td colspan=“1” rowspan=“2”>Weekend Wrap</td>
            <td colspan=“1” rowspan=“2”>Radio U</td>

        </tr>
        <tr>
            <th>7:30</th>
            <td colspan=“5”>World News Feed</td>
        </tr>
        <tr>
        <th>8:00</th>
            <td colspan=“5” rowspan=“4”>Classical Roots</td>
            <td colspan=“1” rowspan=“3”>What can you say?</td>
            <td colspan=“1” rowspan=“4”>University on the air</td>
        </tr>
        <tr>
        <th>8:30</th>
        </tr>
        <tr>
        <th>9:00</th>
        </tr>
        <tr>
        <th>9:30</th>
            <td colspan=“1” rowspan=“4”>Animal Talk</td>
        </tr>
        <tr>
        <th>10:00</th>
            <td colspan=“5” rowspan=“4”>Symphony City</td>
            <td colspan=“1” rowspan=“1”>Word Play</td>
        </tr>
        <tr>
        <th>10:30</th>
            <td colspan=“1” rowspan=“1”>Brain Stew</td>
        </tr>
        <tr>
        <th>11:00</th>
            <td colspan=“1” rowspan=“3”>Opera Live from the East Coast</td>
            <td colspan=“1” rowspan=“1”>The Inner Mind</td>
        </tr>
        <tr>
        <th>11:30</th>
            <td colspan=“1” rowspan=“1”> Grammar Rules!!</td>
        </tr>
        <tr>
        <th>12:00</th>
            <td colspan=“5” rowspan=“1”>Book Club</td>
            <td colspan=“1” rowspan=“1”>Weekend Wrap</td>
        </tr>
    </tbody>



</table>

1 个答案:

答案 0 :(得分:0)

它是因为你使用了错误的引号“,”。你必须使用正常的&#34; (ASCII代码:034)