#服务器端
import socket
sever=socket.socket()
sever.bind(('127.0.0.1',8080))
sever.listen(3)
con,addr=sever.accept()
print(con.recv(1024))
con.send(b'HTTP/1.1 200 ok \r\n\r\n')
con.send(b'ok')
<!DOCTYPE html>
<html>
<head>
<title>百度一下,你就知道</title>
<style type="text/css">
.a1{height: 20px;
width: 200px;}
.aaa{height: 50px;
width: 200px;
background-color: #9dffff
}
.aaa a:link{text-decoration:none;}
.aaa a:hover{text-decoration:underline;}
</style>
</head>
<body>
<div>
<form action="http://127.0.0.1:8080" method="post">
<div align='right'>
<span >我已注册现在就</span>
<span>
<a href="https://passport.baidu.com/v2/?reg&tt=1541143691575&overseas=undefined&gid=00078B1-50E2-4275-9E1F-DB9DE484F2F6&tpl=mn&u=https%3A%2F%2Fwww.baidu.com%2F">
<label for="login"></label>
<input value="登录" type="button" id="login">
</a>
</span>
</div>
<div><a href="http://www.baidu.com"><img src="https://passport.baidu.com/static/passpc-base/img/logo/baidu.gif"></a>
<span>丨注册百度账号</span>
</div>
<div>
<label for="login1">用户名</label>
<input class='a1' type="text" id="login1" autofocus="" placeholder="请设置用户名">
</div>
<div>
<label for="login2">手机号</label>
<input class='a1' type="text" id="login2" autofocus="" placeholder="可用于登录和找回密码">
</div>
<div>
<label for="login3">   密码</label>
<input class='a1' type="text" id="login3" autofocus="" placeholder="请设置登录密码">
</div>
<div>
<label for="login4">验证码</label>
<input class='a1' type="text" id="login4" autofocus="" placeholder="请输入验证码">
<input type="button" value='获取验证码' >
</div>
<div class='aa'>
<input type="checkbox" id="kk" />
<span>
<label for="kk">阅读并接受
<a href="https://passport.baidu.com/static/passpc-account/html/protocal.html" target="_blank" text-decoration:none>《百度用户协议》</a>
和
<a href="https://www.baidu.com/duty/yinsiquan.html" target="_blank">《百度隐私权保护说明》</a>
</span>
</div>
<div>
        <input class='aaa' type="submit" value='注册' >
</div>
</form>
</div>
</body>
</html>