Use a table to adjust the format of the form controls to make them look better

Use a table to adjust the format of the form controls to make them look better
Because I want to write a web page myself, I am also learning some things about HTML language. This reminds me of my interest in web design in college. Unfortunately, I didn’t have my own computer at that time. I often went to Internet cafes to buy floppy disks to download some pictures, and then used fontpage to make some web pages. Later, I bought a computer and was fascinated by "Legend", and I also forgot about web design....

Since I was working on Ubuntu, and there were very few WYSIWYG web design tools under Linux, I finally chose Bluefish.

I want to make a form to add devices, but it looks ugly because the prefixes are different. As shown in the figure:

Copy code
The code is as follows:

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
<body>
Username:<input type="text" name="username"><br/>
Password:<input type="password" name="password">
</body>
</html>



This input box is not aligned, I feel so sad, then my colleague said that I can use a table to format it, after asking for advice, the code is as follows:

Copy code
The code is as follows:

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
<body>
<table>
<tr>
<td>Username:</td>
<td><input type="text" name="username"><br/></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password"></td>
</tr>
</table>
</body>
</html>



Ahaha, I got a new skill. Thanks to Tong Jun for his strong support~~

It also taught me how to use CSS to control the format of the table.

Copy code
The code is as follows:

<style type="text/css">
table{border-top:#000 solid 1px; border-left:#000 solid 1px;}
td{ border-bottom:#000 solid 1px; border-right:#000 solid 1px;}
</style>

<<:  How to deploy kafka in docker

>>:  Docker starts MySQL configuration implementation process

Recommend

WeChat applet selects the image control

This article example shares the specific code for...

Detailed explanation of writing multiple conditions of CSS: not

The :not pseudo-class selector can filter element...

JavaScript implements mouse drag to adjust div size

This article shares the specific code of JavaScri...

How to implement the observer pattern in JavaScript

Table of contents Overview Application scenarios ...

Creative About Us Web Page Design

Unique “About”-Pages A great way to distinguish yo...

Solve the problem that PhpStorm fails to connect to VirtualBox

Problem description: When phpstorm's SFTP hos...

Detailed explanation of HTML basics (Part 2)

1. List The list ul container is loaded with a fo...

How to make spaces have the same width in IE and FF?

body{font-size:12px; font-family:"宋体";}...

Self-study of MySql built-in functions knowledge points summary

String functions Check the ascii code value of th...

MySQL 8.0.12 winx64 decompression version installation graphic tutorial

Recorded the installation of mysql-8.0.12-winx64 ...

Summary of various methods for JavaScript to determine whether it is an array

Table of contents Preface Array.isArray construct...

A detailed introduction to Linux memory management and addressing

Table of contents 1. Concept Memory management mo...