@Akavra

Как еще можно оформить задание с таблицей?

Вообщем, сегодня на уроке я изучил создание таблиц в HTML, но в нем упоминалось не про атрибут, width/height и про bgcolor, но поизучав и погуглив пару шутчек, я написал такой код
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Кубик-таблица</title>
</head>
<body>
    <table style="width: 300px; height: 300px;">
        <tr>
            <th colspan="2" bgcolor="Moccasin" height=33% width=33%>&nbsp;</th>
            <th bgcolor="GreenYellow" width=33% height=33%>&nbsp;</th>
        </tr>
        <tr>
            <th rowspan="2" bgcolor="Moccasin" width=33% height=33%>&nbsp;</th>
            <th colspan="2" bgcolor="Cyan" height=33%></th>
        </tr>
        <tr>
            
            <th bgcolor="cyan">&nbsp;</th>
            <th bgcolor="greenyellow">&nbsp;</th>
        </tr>
    </table>
</body>
</html>


и у меня возник вопрос, как еще можно оформить это задание?653e403600019791619128.png
  • Вопрос задан
  • 77 просмотров
Решения вопроса 1
delphinpro
@delphinpro Куратор тега HTML
frontend developer
<table class="table">
    <tr>
        <td class="moccasin" colspan="2">&nbsp;</th>
        <td class="greenyellow">&nbsp;</th>
    </tr>
    <tr>
        <td class="moccasin" rowspan="2">&nbsp;</td>
        <td class="cyan" colspan="2"></td>
    </tr>
    <tr>
        <td class="cyan">&nbsp;</td>
        <td class="greenyellow">&nbsp;</td>
    </tr>
</table>
<style>
.table {
  width: 300px;
  height: 300px;
  border-spacing: 5px;
  border-collapse: separate;
  border: none;
}
.table td {
  width: 33%;
  height: 33%;
}
.moccasin {
  background: moccasin;
}
.greenyellow {
  background: greenyellow;
}
.cyan {
  background: cyan;
}
</style>
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы