Interview question: Three-row and three-column layout, tables are merged and nested tables are not allowed

Interview question: Three-row and three-column layout, tables are merged and nested tables are not allowed
There is an interview question that requires: a three-row and three-column layout, where the second column of the first row and the second column of the second row are merged, and the second column of the third row and the third column are merged. Nested tables are not allowed.


Copy code
The code is as follows:

<!DOCTYPE HTML >
<html lang="ch-CN">
<head>
<meta charset="utf-8">
<title> </title>
<style>
html,body{padding:10px;margin: 0px;width:100%;height:100%;overflow: hidden;}
td{width:100px; height:100px;text-align:center; font-family:arial; border:1px solid #aaa; vertical-align:center;}
</style>
</head>
<body>
<table border="1" style='border:1px solid #aaa' cellspacing="0" cellpadding="10">
<tr>
<td>1</td>
<td rowspan='2'>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td colspan="2">7</td>
</tr>
</table>
</body>
</html>

<<:  CSS code to achieve background gradient and automatic full screen

>>:  JavaScript operation elements teach you how to change the page content style

Recommend

How to use React to implement image recognition app

Let me show you the effect picture first. Persona...

Implementation steps for Docker deployment of SpringBoot applications

Table of contents Preface Dockerfile What is a Do...

Several ways to solve the 1px border problem on mobile devices (5 methods)

This article introduces 5 ways to solve the 1px b...

MySQL login and exit command format

The command format for mysql login is: mysql -h [...

Analysis of the Principle and Method of Implementing Linux Disk Partition

remember: IDE disk: the first disk is hda, the se...

JavaScript CollectGarbage Function Example

First, let's look at an example of memory rel...

How to view and terminate running background programs in Linux

Linux task management - background running and te...

Linux tac command implementation example

1. Command Introduction The tac (reverse order of...

JavaScript DOMContentLoaded event case study

DOMContentLoaded Event Literally, it fires after ...

How to configure MySQL8 in Nacos

1. Create the MySQL database nacos_config 2. Sele...

How to use the EXPLAIN command in SQL

In daily work, we sometimes run slow queries to r...

DHTML objects (common properties of various HTML objects)

!DOCTYPE Specifies the Document Type Definition (...