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

Detailed explanation of how to use the vue verification code component

This article example shares the specific implemen...

Install Percona Server+MySQL on CentOS 7

1. Environmental Description (1) CentOS-7-x86_64,...

Discussion on image path issues in css (same package/different package)

In CSS files, sometimes you need to use background...

Install mysql5.7.17 using RPM under Linux

The installation method of MySQL5.7 rpm under Lin...

How to achieve the maximum number of connections in mysql

Table of contents What is the reason for the sudd...

Implementing access control and connection restriction based on Nginx

Preface Nginx 's built-in module supports lim...

MySql development of automatic synchronization table structure

Development Pain Points During the development pr...

XHTML no longer uses some obsolete elements in HTML

When we do CSS web page layout, we all know that i...

HTML basics summary recommendation (paragraph)

HTML Paragraph Paragraphs are defined by the <...

In-depth study of JavaScript array deduplication problem

Table of contents Preface 👀 Start researching 🐱‍🏍...

How to use the VS2022 remote debugging tool

Sometimes you need to debug remotely in a server ...

Implementation and usage scenarios of JS anti-shake throttling function

Table of contents 1. What is Function Anti-shake?...

CSS form validation function implementation code

Rendering principle In the form element, there is...