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

A brief discussion on the perfect adaptation solution for Vue mobile terminal

Preface: Based on a recent medical mobile project...

JavaScript Objects (details)

Table of contents JavaScript Objects 1. Definitio...

How to change the website accessed by http to https in nginx

Table of contents 1. Background 2. Prerequisites ...

Steps for docker container exit error code

Sometimes some docker containers exit after a per...

Detailed explanation of using javascript to handle common events

Table of contents 1. Form events 2. Mouse events ...

JavaScript imitates Jingdong magnifying glass effect

This article shares the specific code for JavaScr...

Building an image server with FastDFS under Linux

Table of contents Server Planning 1. Install syst...

How to configure mysql5.6 to support IPV6 connection in Linux environment

Introduction: This article mainly introduces how ...

Solution to uninstalling Python and yum in CentOs system

Background of the accident: A few days ago, due t...

Even a novice can understand the difference between typeof and instanceof in js

Table of contents 1. typeof 2. instanceof 3. Diff...

How to enter directory/folder in Linux without using CD command

As we all know, without the cd command, we cannot...

React native ScrollView pull down refresh effect

This article shares the specific code of the pull...

Table paging function implemented by Vue2.0+ElementUI+PageHelper

Preface I have been working on some front-end pro...