Small problem with the spacing between label and input in Google Browser

Small problem with the spacing between label and input in Google Browser
Code first, then text

Copy code
The code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
div {width:500px; height:500px; margin:0 auto; border:#000 solid 1px;}
label { display:inline-block; width:100px;border:#000 solid 1px;}
input { border:#000 solid 1px;}
</style>
</head>
<body>
<div>
<p><label>Account</label><input type="text" /></p>
<p><label>Password</label><input type="text" /></p>
<p>
<label>Verification Code</label>
<input type="text" /><img src="" width="100" height="20" />
</p>
</div>
</body>
</html>

The effect of opening Google is as follows



The spacing between the label and input of the verification code is obviously larger than the above two. After removing the line break of the verification code and making it one line, the three input boxes are aligned. The reason is still unknown.

PS: I have written before that img and input are not aligned. Just add vertical-align:middle to them.

<<:  About using Keepalived to achieve automatic restart of Nginx and dual-active hot standby high availability

>>:  Solution to index failure caused by MySQL implicit type conversion

Recommend

A detailed discussion of MySQL deadlock and logs

Recently, several data anomalies have occurred in...

Tutorial on installing MySQL8 compressed package version on Win10

1 Download MySQL8 from the official website and i...

JavaScript implementation of the Game of Life

Table of contents Concept Introduction Logical ru...

Vue implements infinite loading waterfall flow

This article example shares the specific code of ...

Linux 6 steps to change the default remote port number of ssh

The default ssh remote port in Linux is 22. Somet...

Several popular website navigation directions in the future

<br />This is not only an era of information...

Summary of some common techniques in front-end development

1. How to display the date on the right in the art...

Detailed explanation of how to create an updateable view in MySQL

This article uses an example to describe how to c...

How to implement hot deployment and hot start in Eclipse/tomcat

1. Hot deployment: It means redeploying the entir...

Several methods of implementing two fixed columns and one adaptive column in CSS

This article introduces several methods of implem...

Detailed explanation of putting common nginx commands into shell scripts

1. Create a folder to store nginx shell scripts /...

Detailed explanation of common usage of pseudo-classes before and after in CSS3

The before/after pseudo-class is equivalent to in...

Summary of the differences between Html, sHtml and XHtml

For example: <u> This has no ending characte...